

In order to handle concurrent file transfers or directory listings a range of data channel ports must be used. Unlike the command channel which remains open during the entire FTP session, the data channel is closed once the transfer of data is complete. The LIST, STOR and RETR commands used for getting a server directory listing, uploading a file and downloading a file are examples of commands (sent using the command channel) that open a data channel. The data channel, runs using on-demand temporary ports listening on the server (passive mode) or on the client (active mode) and is responsible for exchanging data in the form of directory listings and file transfers. The command channel remains open until the client sends the QUIT command to disconnect, or the server forcibly disconnects the client due to inactivity or other reason.


The USER and PASS commands used for authenticating an FTP user are examples of commands that are exchanged on the command channel. The command channel typically runs on server port 21 and is responsible for accepting client connections and handling the exchange of simple commands between an FTP client and server. The FTP protocol exchanges data using two separate channels known as the command channel and data channel. It was first proposed in RFC 114 over 40 years ago and eventually evolved into RFC 959, which is the standard that FTP clients and servers follow today. Learning these key differences can help you when choosing a secure file transfer protocol or troubleshooting common connection issues.įTP (file transfer protocol) is a network protocol that has been around for decades. While the acronyms for these protocols are similar, there are some key differences among them, in particular how data is exchanged, the level of security provided and firewall considerations.

Three common protocols still used in file transfer today are FTP, FTPS and SFTP.
