Difference between Active and Passive FTP

FTP stands for File Transfer Protocol. It is an application layer protocol which transfers files over a network. It uses TCP based service.

FTP works in two different modes:

1. Active FTP :
In the active mode, the client connects on a random port for incoming data connections from the server. Client again sends next port to FTP server which is acknowledged on command channel.

2. Passive FTP :
In the passive mode, the client uses the control connection to send a PASV signal to the server. FTP server sends back IP address and server port number.

Here are few differences between Active and Passive FTP:

Active FTP Passive FTP
In active FTP, client establishes the command channel and the server establishes the data channel. In passive FTP, both the command channel and the data channel are established by the client.
Active FTP provides security to the FTP server. Passive FTP does not provide security to the FTP server.
Active FTP may cause problems because of firewalls. Passive FTP does not have connection issues from firewalls.
Active mode is not used as a default mode of a browser. Passive mode is used as a default mode of a browser.
FTP client acknowledges on data channel. FTP server acknowledges on data channel.
Client sends random port number to the server. Client sends PASV command to the server.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.