FTP is a venerable protocol for transferring files. An FTP transfer requires establishing a connection between a client on the local machine and an FTP server on a remote machine. Once the connection is established, files can be transferred between the local and remote systems in either direction and some file management operations can be performed on the remote system.

FTP was once the most popular way to transfer files between systems, but this is no longer true. Newer protocols and utilities have resolved the primary limitations of FTP, which are:

  • In default FTP, the user's login and password are sent unencrypted, posing security risks.
  • To avoid problems with client firewalls, FTP servers are often run in "passive" mode, which opens more ports to traffic and poses a security risk.
  • Like all TCP applications, FTP can suffer significant slowdown over bad connections.
  • FTP does not support partial file transfers, making it impossible to recover from interruptions.

To address one of the security issues with FTP, the exchange of authentication information can be secured using SSL. This FTP variant is called FTPS and the server must be configured with an SSL certificate in order to support it. Most modern FTP clients support FTPS but older clients may not. Be careful not to confuse FTPS with SFTP, which has an FTP-like interface but is not FTP.

FTP Server

FTP servers are typically installed by system administrators. They may be integrated with a webserver such as Apache or Windows' Internet Information Services, or may be stand-alone software.

If the system you are trying to access via FTP refuses your connection without asking for credentials, the reason may be that no FTP server is running on that system. In this case, you will probably need to use one of the other transfer utilities. The TACC systems Stampede2 and Frontera do not run FTP servers.

FTP Clients

There are a number of command-line FTP clients that you can use, perhaps the most flexible and full-featured of which is lftp (man page). If it is not already installed on your system, you can install it yourself. A typical usage for lftp would be to open a session to a remote system:

% lftp somesystem.somedomain.org

You will then be asked to provide your username and password (which can also be passed in the command). Once your identity is verified, you will be placed in an FTP command environment. There, you can issue commands like get and put to transfer files. You can also issue commands like pwd, ls, cd, mkdir, mv and rm to get information about (and alter) the contents of the remote system. The command help provides information about the available commands and quit exits the tool.

lftp is quite versatile, and its capabilities go well beyond the original FTP protocol and interface. It is able to transfer files via FTPS and SFTP, as well as the standard web protocols (HTTP, HTTPS). It also has some additional options that increase its performance over older FTP utilities, including:

pget
Breaks files up into a specified number of chunks and transfers the chunks in parallel.
parallel
Runs a specified number of transfer processes in parallel.
mirror
Syncs a local folder with a remote folder, or (with reverse -R option) a remote folder with a local folder.

Numerous GUI FTP clients are also available. These applications typically provide a windowed display and allow you to click-select files and folders and drag-and-drop them to initiate transfers. Such clients are described in the GUI client discussion.

 
©  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Inclusivity Statement