What is Passive Mode (FTP)?
Passive mode, also referred to as "PASV mode," is one of the operational modes of FTP (File Transfer Protocol), which is used to transfer files between two computers.
In FTP, the client initiates a connection to the server, authenticates the user via login credentials, and performs file transfers such as uploading files to the server or downloading files from the server. FTP operates using two TCP connections:
In Active Mode, the server sets up a data connection from its TCP port 20 to a random port on the client side. This data connection is then used for exchanging file data. Conversely, in Passive Mode, the server informs the client via the control connection about the port it will use for the data connection. The client then uses this information to establish the data connection to the server.
Passive mode is commonly used when uploading files to web servers provided by hosting or cloud providers. Most clients connect to the internet through firewalls or NAT systems, which block incoming connections initiated from the server. Passive mode resolves this by ensuring the client initiates the data connection.