How an FTP Site Works
-
Starting the Server
-
FTP stands for File Transfer Protocol. It is a method of sending files between a local computer (client) and server (host). An FTP site is initiated when a system administrator issues a command that starts a memory resident program or daemon. The server is usually configured to accept a specific number of connections. Files are stored on the server just as they would be on a normal computer. The system administrator makes a certain directory of files available to particular users or to the general public.
User Connection
-
Users must use an FTP client to connect to an FTP server. They access the FTP server by entering the IP address or domain name. If the FTP server allows anonymous connections, the user will be automatically connected to a public access directory. If the user has a private account, he must enter his username and password.
-
Connection Methods
-
There are three connection methods: active mode, passive mode and extended passive mode. In active mode, the FTP opens a dynamic port connection. In passive mode, the server initiates the connection of both the IP address and the port. In extended passive mode the server connects only the port and relies on prior connections to determine the IP address. The standard established FTP connection port is number 21.
Sending and Retrieving Files
-
Upon connection, users can upload files to the server or download files to their local computers. Files are transferred in ASCII (text files) or Binary (images, programs, video and audio) format. Transfer occurs when a user's FTP client issues commands to the FTP server. Commands include LIST (displays the files in a directory), STOR (initiates a command to upload a file to the server), RETR (retrieves or downloads a file from the server) and many others. When the user is finished and disconnects, the server makes that connection slot available for another user.
Limitations
-
An FTP server is generally run by the root (administrator) user or as a user created specifically for FTP. The more simultaneous connections a server makes, the more RAM, CPU power and bandwidth it consumes. Therefore, the number of connections a server can simultaneously sustain is directly related to the power and bandwidth of the server. If an FTP server reaches the set user limit, all other users will receive an access denied error. Furthermore, the correct port must be opened or forwarded on both ends, which means firewalls must accommodate the transfers.
-
References
Resources
- Photo Credit Wikimedia Commons