What is Passive FTP?
To make your local web site public, you will transfer your files to a computer system (called a web server) which is configured to display your web pages.
File Transfer Protocol: background information
The most common method for getting your web site files from your computer to the web server is called File Transfer Protocol (FTP). Protocol in computer science means a standard procedure for regulating data transmission between computers. There are many software applications (called FTP clients) that will assist you in such data transmission. Dreamweaver contains an FTP client.
The initial connection between your computer system and the Web server: Port 21
When your FTP client first connects to the web server, it establishes a "control session," in which your computer system and the web server give each other commands (now change directories, now transfer files, and so on). Your FTP client has to have a port of entry into the web server”almost like a door for your FTP client to knock on and the web server to open. A web server will probably have many such ports of entry, which are identified by numbers. Most servers set aside Port 21 to receive connections from FTP clients. Dreamweaver is configured to a access Port 21. [See How to configure Dreamweaver to access a different FTP port (TechNote tn_14096) to attempt access to a web server through a different port.]
In order for your FTP client to transfer files, a second session is established between your computer and the web server. In normal FTP, the web server initiates this second connection using another port. This port is sometimes Port 20.
Visual representation of Normal FTP connection
- Your computer connects to the server through Port 21. See Example 1.
- The web server automatically connects back to your computer on some other port. This is often Port 20, but it can be any available port (Example 2).
- The FTP process takes place. Your computer sends commands (like PUT, GET, and PWD) to the web server using Port 21. The computer sends and receives folders, files, and data using Port X (which is often Port 20).
The firewall complication
A firewall acts as a security measure to prevent unauthorized access to a computer network. If your computer system is part of a network protected by a firewall, the web server may not be able to establish this second connection with your computer system.
Visual representation of the failure to connect because of a firewall
- Your computer connects to the web server through Port 21 (Example 3).
- The web server automatically tries to connect to your computer to open the data connection, but cannot get through the firewall (Example 4).
- Your computer's FTP client stalls, and transferring files is not possible. Sometimes the FTP client will return a 550 error or a "Cannot make connection to host" error message.
The potential firewall workaround: Passive FTP
There is a way to get around the firewall difficulty. In "Passive" FTP your computer establishes the second connection, not the web server. Most, but not all, web servers will allow Passive FTP connection. Most firewalls will allow your computer to transfer files in this second connection to the web server (just as it allowed your computer to establish the first connection). The Dreamweaver FTP client has the option to establish Passive FTP.
Visual representation of the Passive FTP process
- Your computer connects to the web server from Port 21 (Example 5).
- Your computer then tells the web server not to respond (to remain passive). Instead, your computer contacts the server via another port (usually a high-number port) to establish the necessary second connection (Example 6) for data transmission.
- Once this second connection is established, the process is essentially the same as before (though usually a bit slower).
Additional information
For more details about how to set up the Passive FTP connection, see Setting up Dreamweaver's FTP connection (TechNote tn_14787).
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
