Computer Science · Ch 11 — Data Communication
File Transfer Protocol (FTP)
File Transfer Protocol (FTP)
What FTP Does
File Transfer Protocol (FTP) is the standard network protocol used to transfer files from one computer to another over a TCP-based network like the Internet. It follows the same client-server model as HTTP: a user (the client) requests a file from a remote machine (the server), and FTP handles the entire transfer.
How an FTP Transfer Works
The process is not a single connection — FTP actually uses two separate connections:
-
Control connection – When a user requests a file transfer, FTP first sets up a connection between the client and the server. This connection is used only for sending commands and receiving responses, not for the actual file data. Optionally, the user can authenticate themselves by providing a user ID and password. (Some public FTP servers allow anonymous logins without any authentication.)
-
Data connection – After the user specifies the file name and its location on the server, a second, separate connection is established. The actual file transfer then happens directly between the two machines over this data connection.
This two-connection design means that commands and data travel on different channels, which makes the protocol more flexible and reliable.
Authentication Options
- Authenticated access – The user provides a valid user ID and password to log in.
- Anonymous access – Some servers allow anyone to access files without authentication. This is common for public software repositories and academic archives.
Problems FTP Solves Automatically
Transferring a file between two different systems might seem simple, but FTP handles several hidden complexities that would otherwise cause errors:
- Different file-naming conventions – One operating system might allow spaces in filenames while another does not; FTP translates between these rules.
- Different data representations – Text files, for example, may use different line-ending characters (carriage return + line feed on Windows vs. just line feed on Unix/Linux). FTP can convert between these formats automatically. …