Accessing Your University Files Remotely from Linux PCs and Laptops

Users with a Linux PC or laptop outside the Computer Science network - at home, in Halls of Residence or elsewhere on the Internet, can access their University files on the School's fileservers. Users can access their Windows Novell H: drive, their Linux home directory, their Macintosh home directory, their Users web site and their Project web site. This document tells you how you can access the files from a Linux PC or laptop.

Access through SFTP

You can access your University files from anywhere on the Internet through the School's SFTP gateway servers. For information about where your files are and which gateways to use, see Accessing Files Remotely.

Using Nautilus or Caja to Connect to a Fileserver

Nautilus is the file manager application in GNOME 2 desktops like older versions of Ubuntu and Fedora. A version is also in GNOME 3 desktops like Ubuntu's Unity, LinuxMint's Cinnamon and GNOME Shell. Caja is the file manager in the Mate graphical user interface.

Start nautilus or caja from the applications menu of your Linux distribution. Alternatively, you can start it from a home directory icon, or a Computer icon or similar which may be found on the desktop or on the dashboard.

When you have an open nautilus or caja window, you can use Connect to Server... from the File menu.

In the Connect to Server dialogue window, choose SSH as the Type and enter the name of the server you wish to connect to. A full list of gateway fileservers is available in Accessing Files Remotely. Put your username in the User Name field and your University password in the Password field. Click the Connect button.

Once the connection is made, a file manager window opens. You can drag files between the window and the desktop, or other nautilus or caja file manager windows.

To delete a file, drag it to your wastebasket. On some versions of Linux, this is called the Deleted Item folder. Alternatively right-click on the file icon to obtain an options menu, and select Move to the Deleted Items folder or Wastebasket, or select Delete from that.

The connection will create an icon on your desktop. If you close the file manager window, you can re-open it by double-clicking on the icon. When you have finished, right-click on the icon and disconnect from the server by selecting Unmount Volume from the menu.

Some very old versions of nautilus may not be able to use SFTP at all. In these cases, you should use an alternative application, such as Filezilla, or use CIFS protocols if you have access to the University VPN.

Using sshfs to Connect to a Fileserver

The sshfs application is a FUSE program which will mount filesystems from SFTP servers.

FUSE (Filesystem in Userspace) is an interface which allows user programs, such as sshfs, to export a virtual filesystem to the Linux kernel. In this way, such filesystems can be attached to the Linux file hierarchy. This is particularly useful if you want to use Linux commands, scripts or programs to access your files on the remote server.

If you have access to FUSE on your Linux workstation or laptop, you can use sshfs to mount any of our gateway fileservers. First, you need to create a local directory as the mount point for the remote filesystem. Then give the sshfs command to mount your files from the fileserver. The format of the command is:

sshfs user@host: mountpoint

For example, type the following in a terminal window to mount your Project web site files in a sub-directory of your local home directory called myprojecsite:

mkdir ~/myprojectsite
sshfs scmxxx@websites.cs.cf.ac.uk:websites/scmxxx/project ~/myprojectsite

sshfs will prompt you for your password. Use you standard University password for all servers. You will then see your Project web site files in directory /myprojectsite.

cxxxxx@lapis ~ $ ls ~/myprojectsite
cgi-bin E.G.User index.htm TestScriptSchoolsComscZ.pdf

To unmount (disconnect) the fileserver, use the fusermount -u command:

fusermount -u ~/myprojectsite

sshfs prerequisites, FUSE and sshfs must be installed on your Linux PC or laptop. If they are not, you will need root or sudo permissions to install them.

For Ubuntu, LinuxMint and Debian, you can install sshfs and FUSE with:

sudo apt-get install sshfs

On Fedora, FUSE and sshfs come as standard packages from the Fedora repositories. Package fuse-sshfs contains sshfs. As root type the following to install FUSE and sshfs.

yum install fuse-sshfs

On CentOS or RHEL, FUSE and fuse-sshfs are available from the RepoForge repository. Go to http://repoforge.org/use/ to see how to add RepoForge as a yum repository and then install sshfs as above.

On Fedora and RHEL or CentOS, the user must belong to group fuse in order to mount remote filesystems with the sshfs command.

To add yourself to group fuse, edit file /etc/group (as the root user, or with sudo). Find the line similar to that shown below and add your username to the end, separated by a comma from other usernames, if present. (The group number may differ).

fuse:x:474:

Filezilla

Filezilla is a portable STFP application available on all platforms. It gives you a window divided vertically such that the left-hand panel is a view of the local file system, while the right-hand panel is a view of the remote file system. You can drag and drop files between the two.

If you prefer to use Filezilla, it can be downloaded from http://filezilla-project.org/.

Access through CIFS

Another way to access your files is with CIFS (Microsoft Windows Share) protocols. Before you can use CIFS from an external location, you must first connect to the University's VPN. Connection to the VPN is available for staff and research students only.

Once connected to the VPN, you can use the gateway servers with CIFS rather than SFTP protocol. But for your Windows H: drive, you will need to use host comsccifs1.cf.ac.uk rather than driveh. For information about where your files are and which gateways to use, see Accessing Files Remotely.

Using Nautilus or Caja with CIFS

Nautilus and Caja can connect to a server with CIFS (Windows Share) protocols as well as SFTP.

Start nautilus or caja from the applications menu of your Linux distribution or from a file manager icon on your desktop.

When you have an open nautilus or caja window, choose Connect to Server... from the File menu.

In the Connect to Server dialogue window, choose Windows Share as the Type and enter the name of the server you wish to connect to. A full list of gateway fileservers is available in Accessing Files Remotely.

Put your username in the Share field and again in the User Name field and your University password in the Password field.

If you are connecting to home.cs.cf.ac.uk, machome.cs.cf.ac.uk or websites.cs.cf.ac.uk use domain name id.add.cardiff.ac.uk. If you are connecting to comsccifs1.cf.ac.uk, leave this blank.

Click the Connect button.

Once the connection is made, a file manager window opens and behaves in the usual way. You can drag files between the window and the desktop, or other nautilus or caja file manager windows etc.

Mounting a Windows Share

It's possible to mount a Windows share onto your local Linux system with mount. You will need to have root or sudo permission to do this.

First of all, create a local directory where you can mount the remote system. This can be anywhere on your system that is accessible both to you (the local user) and root.

mkdir /tmp/cxxxxxx

Now use the mount command with the -t cifs option. For example

sudo mount -t cifs //websites.cs.cf.ac.uk/cxxxxxx /tmp/cxxxxxx -o username=cxxxxxx,domain=id.add.cardiff.ac.uk,uid=localu

where cxxxxxx is your username on the remote server (your University username) and localu is your username on your local Linux laptop or workstation. The uid option makes sure that the files appear to be owned by the local user so that you can access them in the normal way.

The files will be in directory /tmp/cxxxxxx.

For mounting your Windows H: drive, omit the domain option.

sudo mount -t cifs //comsccifs1.cf.ac.uk/cxxxxxx /tmp/cxxxxxx -o username=cxxxxxx,uid=localu