Search

What is FTP (File Transfer Protocol)

FTP (File Transfer Protocol)

The FTP (File Transfer Protocol) is another important Application Layer protocol of the TCP/IP protocol suite. The FTP (File Transfer Protocol) is used to send and receive electronic files from one computer to another computer. Similar to TELNET, FTP was also evolved in early 1970s. The original specification for the FTP (File Transfer Protocol) was published by Abhay Bhushan as RFC 114 on 16 April 1971. The current specifications of FTP are published on October 1985, as RFC 959. FTP commands are used to control file transfer between two computers. The FTP (File Transfer Protocol) supports both binary and text files, of different sizes and different formats. Unlike TFTP (Trivial File Transfer Protocol), FTP (File Transfer Protocol) supports user authentication.

ftp-file-transfer-protocol.png

Unencrypted FTP Communication

Similar to TELNET, long back when FTP was designed, the internet was only at universities and research centers. There was no much security risk those days. One main point to remember is that, FTP (File Transfer Protocol) sends its traffic unencrypted. Unencrypted data transfer can cause leak of data and user authentication details.

Please visit following link to learn why plain FTP is not secure.

Types of FTP Connections

There are two different types of FTP connections. When you connect to an FTP Server from a FTP Client, two FTP connections over TCP are created. 1) FTP Connection (Control connection) and 2) FTP-DATA Connection (Data transfer connection).

1 - FTP Connection (Control connection)

When a user wants to transfer a file from a FTP Server, FTP creates a TCP connection to the FTP Server, for exchange of FTP control messages (mainly FTP Commands and FTP Response Codes). Initial connection is FTP Connection (Control connection) and user authentication data is exchanged via FTP Control connection. FTP allows anonymous connection also.

2 - FTP-DATA Connection (Data transfer connection)

Once the user is authenticated and file transfer is approved, FTP creates another TCP connection for the data transfer. The file transfer or directory listing is done over the data connection. FTP Control connection stays connected for the entire FTP session. But new TCP connection is established for each file transfer requests.

Types of FTP Connection modes

FTP (File Transfer Protocol) supports two types of connection modes; 1) FTP Active mode and 2) FTP Passive mode. In FTP Active mode, the TCP three-way handshake for the FTP-DATA Connection is initiated by the FTP Server. Inbound TCP three-way handshake to Client computers can cause connection drops at Client firewalls. In FTP Passive mode, a special FTP command called PASV is used to inform the FTP Server that the FTP Client wants to use FTP Passive mode. Then FTP Server opens a new TCP port and starts listening at the new TCP port for FTP-DATA Connection and FTP Client initiates TCP three-way handshake to FTP Server.

Please visit following link to learn more about FTP Active mode and Passive mode.

Related Tutorials
Important RFCs related with FTP
What is anonymous FTP
FTP Active vs Passive modes
Different types of FTP Client software
How to use FTP Active mode in FileZilla Client
FTP Commands
FTP Response Codes
Important commands in Windows command-line FTP client
How FTP works
Why FTP is not secure
Differences Between FTPS and SFTP
How to install FileZilla FTP Server
How to add a user in FileZilla FTP Server
How to add anonymous user account in FileZilla FTP Server
How to configure TLS (FTPS) in FileZilla FTP Server
Difference between Require explicit FTP over TLS and Require implicit FTP over TLS
How to install FileZilla FTP Client
How to login to a FTP Server using FileZilla FTP Client
FileZilla Site Manager
How to login to a FTP Server using Windows Command-line FTP Client