File Transfer Protocol (FTP) is the protocol used to transfer files between two computers on a Transmission Control Protocol/Internet Protocol (TCP/IP) network. FTP was one of the earliest protocols used on TCP/IP networks and the Internet. Although the World Wide Web (WWW) has replaced most functions of FTP, it is still used to copy files between clients and servers over the Internet.

FTP to transfer files between two computers, both computers must support their respective FTP roles. For example, one needs to be an FTP client and the other an FTP server. The FTP client can issue commands to the server to download and upload files and create and change directories on the server.

FTP uses TCP as its transport for all communications and data exchanges between the client and the server. TCP is a connection-oriented protocol, which means the communications session is established between the client and the server before data is transmitted. The connection remains active during the entire FTP session. Connection-oriented sessions are known for their reliability and error recovery features. These features include the following:

  • Flow control: Because both client and server computers participate in the transmission of the packets, any potential problems of packet overflows and lost packets are virtually eliminated.
  • Acknowledgment: The computer sending data packets expects an acknowledgment (ACK) from the destination computer. This acknowledgment verifies that the packet was successfully received at the destination.
  • Retransmission: If the transmitting computer does not receive an ACK for a specified period, it assumes that the packet became lost or corrupted and retransmitted the packet.
  • Sequencing: All packets are numbered and sent in order, so the receiving the computer knows how to reorganize the data.
  • Checksum: All packets contain a checksum to ensure the integrity of the data. If the data is corrupted somewhere during the transmission, the checksum is used to indicate that the data is not the same data that was sent.

FTP is distinct from the Trivial File Transfer Protocol (TFTP). TFTP is a fast, simple file transfer protocol that uses the User Datagram Protocol (UDP) transport. UDP, unlike TCP, is a connectionless protocol and does not have the capability of re-transmitting packets. This means that UDP is not as reliable as TCP.