FTP - File Transfer Protocol

File transfer from one folder to another

 fatido / Getty Images

File Transfer Protocol (FTP) allows you to transfer copies of files between two computers using a simple network protocol based on Internet Protocol. FTP is also the term used when referring to the process of copying files using FTP technology.

History and How FTP Works

FTP was developed during the 1970s and 1980s to support file sharing on TCP/IP and older networks. The protocol follows the client-server model of communication. To transfer files with FTP, a user runs an FTP client program and initiates a connection to a remote computer running FTP server software. After the connection is established, the client can choose to send and/or receive copies of files, singly or in groups.

The original FTP clients were command-line programs for Unix operating systems; Unix users ran 'ftp' command-line client programs to connect to FTP servers and either upload or download files. A variation of FTP called Trivial File Transfer Protocol (TFTP) was also developed to support low-end computer systems. TFTP provides the same basic support as FTP but with a simplified protocol and set of commands limited to the most common file transfer operations. Later, Windows FTP client software became popular as Microsoft Windows users preferred to have graphical interfaces to FTP systems.

An FTP server listens on TCP port 21 for incoming connection requests from FTP clients. The server uses this port to control the connection and opens a separate port for transferring file data.

How to Use FTP for File Sharing

To connect to an FTP server, a client requires a username and password as set by the administrator of the server. Many so-called public FTP sites do not require a password but instead follow a special convention that accepts any client using "anonymous" as its username. For any FTP site public or private, clients identify the FTP server either by its IP address (such as or by its hostname (such as ftp.lifewire.com).

Simple FTP clients are included with most network operating systems, but most of these clients (such as FTP.EXE on Windows) support a relatively unfriendly command-line interface. Many alternative third-party FTP clients have been developed that support graphical user interfaces (GUIs) and additional convenience features.

FTP supports two modes of data transfer: plain text (ASCII), and binary. You set the mode in the FTP client. A common error when using FTP is attempting to transfer a binary file (such as an image, program, or music file) while in text mode, causing the transferred file to be unusable.

Alternatives to FTP

Peer-to-peer (P2P) file-sharing systems like BitTorrent offer more advanced and secure forms of file sharing than FTP technology offers. These, plus modern cloud-based file-sharing systems like Box and Dropbox, have largely eliminated the need for FTP with respect to file sharing. Web developers and server admins still need to use FTP on a regular basis.