Search Knowledge Base by Keyword
What is the Difference Between Active and Passive FTP?
FTP stands for File Transfer Protocol. FTP is an application layer protocol which transfers files over a network.
An FTP server can operate in two different modes by default – Active or Passive.
Active mode is the original FTP mode and often the default FTP mode. Here’s how a typical Active FTP transaction would take place:
- A user connects from their FTP client to FTP port 21 on the server. The FTP client sends the PORT command, to specify which client-side port the server should connect to. This port is used for the data channel, differing from the port used for the command channel.
- The FTP server connects from port 20 to the designated data channel port on the FTP client. The connection is then established, and then the file transfers are made through these ports.
Passive mode is similar to Active mode, but with a few key differences. Here’s how a typical Passive FTP transaction would take place:
- A user connects from a random port on their FTP client to FTP port 21 on the server, and then issues the PASV command. The FTP server then responds to indicate which port it has opened for data transfer.
- The user then connects from a different random port to the port specified in the server’s response. The connections is then established and the data transfer can take place between these two ports.