skip to primary navigationskip to content
 

FTP (including anonymous FTP)

The use of FTP

Standard FTP programs are mainly needed for anonymous FTP (fetching files from archives which are publicly available), but may also rarely be required where a host does not support SFTP or SCP transfers.

Using anonymous FTP is very like using FTP for any other purpose, except that anonymous FTP has special conventions for logging in.

An important feature of FTP is that you may have to decide whether transfers are to be made in ASCII or binary mode (the program you are using may attempt to make the right choice for you, but in some instances you may need to force a particular mode.)

FTP client programs are very widely available; the recommended programs are ftp on Unix, FileZilla on Windows and Fetch on a Macintosh. Note that it is also often possible to fetch files using a Web browser (see below), and this is usually the easiest method of all.

Files fetched from anonymous FTP servers are often in compressed formats, and you may need to know how to uncompress them.

FTP via a Web browser

On any of the standard platforms (Unix, Windows, Macintosh) you can connect to an FTP server using a Web browser. To do this, enter a URL starting with ftp: instead of http:, and include your user identifier before the name of the host, for instance

  • ftp://spqr1@hostname

You will be asked for your password for the remote system, and then taken to a directory listing, which (depending on the system) may be your home directory or may be the root directory of the whole system. You can navigate by clicking on directory names until you reach the file or directory you want. To fetch a file you can double-click on it. On some systems you can also transfer a file in either direction by dragging and dropping it, but not all browsers support this feature properly (so that some of them do not offer any way to transfer a file to the host end).

This mode of using FTP does not allow you to do anything other than listing files and transferring them. It is however useful for anonymous FTP.

Anonymous FTP

This facility is used for fetching to your local system files which have been made publicly available on various archive servers all over the world. You do not need to have an account on the remote system, and you are not normally allowed to send files to it. It is usually more efficient to fetch files from local or UK or European sites wherever possible, rather than from the rest of the world. The Computing Service runs a server called ftp.csx.cam.ac.uk with a variety of local, public domain or University-licensed software.

Finding out what files are available for fetching from a given server is easiest if the server provides a Web interface so that you can get the information using a Web browser. Otherwise you can use FTP to examine directories and so on. Web search engines can also be used to search the Internet for particular items of software.

It is simplest, where possible, to fetch such files through the web; most of the major archive sites have Web interfaces with descriptive text, making it easy to select the files you need and download them with a mouse click. Alternatively, in most Web browsers you can start an FTP session simply by entering a URL starting with ftp: instead of http:, for instance

  • ftp://ftp.csx.cam.ac.uk

for the Computing Service FTP server. This takes you to a directory listing from which you can navigate through directories to the file you want, and then double-click to download the file. Many browsers also allow you to fetch a file by dragging it from the browser window to any open folder on your desktop.

If neither of the above options is available to you, or if you need to do more complicated operations, then you may need to use a full FTP client.

Using an FTP client for anonymous FTP

For anonymous FTP using an FTP program, many systems use the word anonymous as the user identifier; some use guest or ftp or anon. If your information about the archive server does not tell you what identifier to use, try these.

The convention for anonymous FTP is to type your e-mail address as a password (either the bare identifier fjc1000 or the full address fjc1000@cam.ac.uk).

The other point to note about anonymous FTP is that most files (programs etc., and any file which has been compressed) will require to be transferred in binary (see above).

Example

To fetch from the Computing Service FTP server, using anonymous FTP, the README file about the Unix section of the server, and store it under a new name in subdirectory info on the client Unix system (e.g. MCS Linux)

  • ftp ftp.csx.cam.ac.uk set up a connection to the FTP server
  • Name: anonymous
  • Password: fjc1000
  • ftp> cd pub/unix point to the source directory on the server
  • ftp> dir list the contents of the directory
  • ftp> lcd info point to the destination directory on DS-Filespace
  • ftp> get README unixreadme fetch and rename the file
  • ftp> quit close the connection and quit FTP