What is FTP?

The File Transfer Protocol (FTP) is a network protocol specified in the RFC 959 which allows file transfer via TCP/IP networks. It is used to transfer files from server to client (download), from client to server (upload) or between two servers, controlled by the client. In addition, FTP allows creating directories and reading directory contents as well as renaming or deleting directories and files.

FTP uses separate connections for control and transfer: An FTP session is initiated by the client's establishing a TCP connection to the control port of the server (the default port for this being port 21). Via this connection, commands are sent to the server. The server replies to each command with a status code, which is often appended with an explanatory text. Most commands, however, will only be accepted after successful authentication. Separate TCP connections are used to send and receive files and to transfer directory listings for each operation. FTP knows two modes for establishing those connections: active mode and passive mode.

Many FTP servers, in particular servers at colleges or universities and mirror servers, offer what is called "anonymous FTP": In addition to log-ins under real user accounts, they also allow users to log in under a special user account, "anonymous" and/or "ftp", for which no password is needed or any password can be entered. However, "netiquette" requires the user to enter his valid e-mail address as password when using anonymous FTP.

Since FTP is a text-based protocol, data as well as authentication information is transferred as plain text without encryption. Thus, FTP should not be used for confidential data and file transfers that exceed the range of anonymous FTP use. Alternative solutions addressing this issue include, among others, Secure File Transfer Protocol (Secure FTP), Secure Copy (SCP), and SSH File Transfer Protocol (SFTP).