Changes to Maths Personal Web Pages hosting



Since 2006, web content for users who have Personal Web pages (PWPs) has been stored in a folder called ~/public_html within their central College ICNFS home directory and this data has been mounted and served from the central College web farm. However, the amount of space available on ICNFS has always been very restricted with most users being limited to a 'hard' limit of just 400 MB each which, realistically in the 21st century when many smartphone users are walking around with 256 GB of storage in their pockets - that's over 100 times as much! This space limitation was causing problems for a number of people in the department resulting in workarounds involving using separate web servers to serve content that couldn't be fitted into the official PWP.

Following agreement reached with ICT in March, we have now taken ICNFS storage, including PWP web content for those who have this, back in-house where it is stored on a Maths server. The changeover oocurred early on Monday morning, April 20th with client systems in Maths that were connected to ICNFS being switched to the new server and at the same time, the College webfarm serving users' PWPs was switched over to the Maths server to access the web content.

Since the new Maths server does not support Windows SMB/CIFS network file access, the original PWP support documentation is currently being rewritten in light of these chanages but for now you can access your PWP content as described below.

Accessing your PWP web content

There are several ways in which you can get your pages, images, sound files, etc into your home pages:

Using file transfer methods, two options are supported:
via sftp
via scp

Using direct filesystem access from a Linux or MacOS system:

by mounting your home pages on your Linux/UNIX system via NFS

Interactively: by logging into a Maths Linux system either at the local screen/keyboard or remotely via ssh and editing your pages with a text editor

These will be described in turn starting with file transfer methods.

sftp

This is a secure, encrypted version of the traditional FTP file transfer program - a SFTP client is installed on all college Windows machines as part of the SSH Secure Shell package and can be acessed from Start... Programs SSH Secure Shell... Secure File Transfer Client. Alternatives include FileZilla and WinSCP. For the Macintosh, Fugu is recommended and the long-time FTP client Fetch has now had SFTP facilities added to it. (You can also drop down into a shell terminal and run sftp from the command line as this is part of the native ssh installation in the UNIX operating system that underlies Mac OS X). For UNIX/Linux the gnome Nautilus and KDE Konqueror filemanagers also have SFTP capabilities and as with Mac OS X, you can also run sftp directly from the command line.

You can connect to any Linux system in Maths using a sftp client but if you are outside the college, you will need to connect to a system that has external ssh access through the college's perimeter firewall, as external access to most Linux/UNIX systems in Maths is not possible. A list of the systems that are currently accessible externally is kept here.

Here is an example of a command line sftp login from a PC on-campus running Linux to lovelace (lovelace.ma.ic.ac.uk), which is one of the Maths general-access compute servers - note the short-form addressing where the host is simply referred to as 'lovelace' since the connection is being made from a computer on the same sub-domain (ma.ic.ac.uk) as lovelace; if you are connecting from a different department or from outside the college, you will need to give the full Internet address lovelace.ma.ic.ac.uk:

andy@anahata:~ $ sftp lovelace
Connecting to lovelace...
andy@lovelace's password: 
sftp>

scp

scp (secure copy) is a utility present on most UNIX and Linux systems that allows the copying of files or even complete directory trees between UNIX/Linux systems with a single command. If you are using such a system, you can transfer your home page content to/from the Maths webserver in this way and scp has many advantages over sftp including the ability to use it without a password using standard ssh private/public keys, it can be executed from scripts and it is possible to preserve the original file parameters (date & time, ownership, permissions, etc) in the copied files.

A simple example of the syntax for using scp on a Linux systems is given here - the file gprs-network-info.html is being transferred from my desktop workstation to the mobile_networks subfolder in my public_html folder:

andy@anahata:~ $ scp gprs-network-info.html andy@lovelace.ma.ic.ac.uk:public_html/mobile_networks
andy@lovelace.ma.ic.ac.uk's password: 
gprs-network-info.ht 100% |*****************************| 76075       00:00
There's at least one free scp client for Windows called WinSCP but most of the other packages that claim to implement scp for Windows actually use sftp whose interface is quite different.

Mounting your home pages on your Linux/UNIX system via NFS

Users of Linux and UNIX systems (and Macintosh users too if they are so inclined to use the underlying UNIX of Mac OS X) can mount the webservers's home page filesystem on their own systems by following these instructions:

  1. log into your system as root or become root if you are already logged in

  2. create the mount point /home/ma, eg:

    mkdir /home/ma

  3. now add the following line to your /etc/fstab:

    pwps.ma.ic.ac.uk:/home/ma /home/ma nfs rw,bg,intr,soft,nosuid,nodev,rsize=8192,wsize=8192 0 0
    (all on one line).

    If you already have NFS mounts listed in your /etc/fstab, the existing entries may look quite different to the one above. This is because anything after the 'nfs' in the line shown above is optional and your existing entries may not have these, or they may have different options. Omitting all the options entirely will still work and allow you to mount the exported home page directories - the options shown prevent your system hanging at boot time if there is a network or server failure and the home pages can't be mounted; they also speed up NFS read/write performance and stop your computer wasting time at boot-up trying to check the remote filesystem :-).

  4. now mount the home pages from pwps.ma.ic.ac.uk onto your system - the lazy way of doing this is to simply type:

    mount -a

    to mount in one go all the filesystems listed in /etc/fstab including the newly added home page filesystem exported from the pwps.ma server. Of course, if you prefer you can do things the hard way by mounting this individually on its own - you might have to do this anyway if you have deliberately unmounted a device listed in your /etc/fstab and you don't want it remounted now: the command syntax to do this varies from one UNIX flavour to another but this one will work with sensible defaults with any Linux:

    mount -t nfs pwps.ma.ic.ac.uk:/home/ma	/home/ma

Interactively, by logging into a Linux system and working with your pages directly

You can also log into any Maths Linux system directly using ssh (Secure SHell), change to your public_html folder and edit your home pages and manipulate files, folder and images directly on the server. You can find some information about SSH here; users of UNIX/Linux text editors tend to belong to either the vi camp or the emacs camp so to keep everyone happy, both are installed on Maths Linux systems - the installed version of vi is actually Vim (VI iMproved).

Image creation and editing is possible using The Gimp, an alternative to Photoshop that handles many image formats and contains a lot of tools for both artists and photo-retouchers.

Also installed is the ImageMagick suite, a collection of powerful command line utilities that allow ypu to perform all sorts of format conversion, resizing, image conversion, special effects, colour editing, etc. Although you can run these programs from the command line during an interactive login session, the main reason this suite is installed is so that you can actually run these programs from a web script written in Perl or PHP so that you can do a lot of exciting and adventurous things with images in real-time.

For interactive use there is a X-Window GUI frontend to the ImageMagick suite called display so you can use this from a Linux or UNIX system running a X-Windows server, or from a Windows PC running VistaExceed, by simply typing:

display

at the prompt and the GUI interface will open on ypur local screen and ypu can use your mouse to perform image edits. (This assumes that your local system is configured correctly to allow remote X-Windows clients to execute displays on your local system, and that you have configured your ssh client to allow X forwarding, etc. Troubleshooting X-Window System problems is beyond the scope of this page so if display doesn't work for you, have a look at the SSH pages.

If you are unfamiliar with the Linux packages you might want to use to create your homepage content in this way, you'll find the documentation on the system you have logged into as standard man pages for most packages:

man vim - about the Vi(Mproved) editor - see the Vim website for more information.

man emacs - about the emacs editor - see the emacs website for more information.

man ImageMagick - about the ImageMagick image manipulation suite - see the ImageMagick website for more information.

The GIMP doesn't have a man page (it is far too big and complex for plain man pages) but The Gimp website will have all the information you need.



Andy Thomas

Research Computing Manager,
Department of Mathematics

last updated: 23.04.24