EmbLogic's Blog

File Transfer Protocol (FTP)

FTP requires two computers, one running an FTP server, the other running an FTP client. The exchange is initiated by the client which logs in under an accepted user name and password. Once this occurs, a session is opened and stays open until closed by either the client or the server, or until it times out. While the session is open, the client may execute numerous FTP commands on the server. These include commands to change directories, list files, get files and put files.

What is the difference between passive and active FTP?

FTP is an unusual protocol in that it uses two ports, one for commands and the other for data. (This is one of the reasons it is superior to HTTP for transferring large files.) Active FTP was invented first. The client initiates a connection on the server’s command port. The server then initiates a connection with the client from its data port. In Passive FTP, the client initiates both connections with the server, which remains “passive”.

Active FTP may cause problems if your client is behind a firewall. From the firewall’s point of view, the FTP server that is trying to initiate a connection with your client looks like an intruder and is usually blocked. This is why many users have difficulty using FTP to download files from behind a firewall.

Passive FTP solves this problem, but creates other problems, notably where FTP server security is concerned. The server must listen on a large number of ports. This requires the firewall to let a lot of unqualified traffic through. Most firewall administrators do not like this.

As a rule, you do not need to be concerned about passive and active FTP unless you administer an FTP server or a firewall. If you experience difficulty using your FTP client from behind a firewall, this is likely the reason. Perhaps you should discuss the matter with your firewall administrator.

Is FTP better than HTTP for downloading files?

Yes, as a matter of fact it is. HTTP is designed to fetch web pages. It is optimized for numerous repeated fetches of small items. FTP is designed for transferring files, and offers faster overall throughput and better error checking. It is not uncommon for a user to fail repeatedly to download a large file via HTTP using their browser, only to succeed on their first try using a dedicated FTP client. If you download large files frequently, and experience difficulties, get a dedicated FTP client software program.

What is anonymous FTP?

FTP requires the client program to log into the server program identifying themselves with a user name and authenticating themselves with a password. Many FTP sites exist however, that freely offer data to the public. In order to comply with FTP’s requirement that a session be opened with a user name and a password, these sites operate what is known as “anonymous FTP”. This involves using a generic user whose name is “anonymous” and who will accept any syntactically valid email address as a password. It enables the server to distinguish between users, since email addresses are always unique, yet allows all users to log in under the common user name “anonymous”.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>