This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ne contains a hyphen instead of a space after the 3digit reply code, and the final line contains the same 3-digit reply code, followed by a
space. For example, the HELP command could generate the reply:
214- The following commands are recognized (* =>'s
MLFL* MRCP* DELE
214 Direct comments to email@example.com. CDUP
MDTM Connection Management
There are three uses for the data connection.
1. Sending a file from the client to the server.
2. Sending a file from the server to the client.
3. Sending a listing of files or directories from the server to the client.
The FTP server sends file listings back across the data connection, rather than as multiline
replies across the control connection. This avoids any line limits that restrict the size of a
directory listing and makes it easier for the client to save the output of a directory listing
into a file, instead of printing the listing to the terminal.
We've said that the control connection stays up for the duration of the client-server
connection, but the data connection can come and go, as required. How are the port
numbers chosen for the data connection, and who does the active open and passive open?
First, we said earlier that the common transmission mode (under Unix the only
transmission mode) is the stream mode, and that the end-of-file is denoted by closing the
data connection. This implies that a brand new data connection is required for every file
transfer or directory listing. The normal procedure is as follows:
1. The creation of the data connection is under control of the client, because it's the
client that issues the command that requires the data connection (get a file, put a file:///D|/Documents%20and%20Settings/bigini/Docum.../homenet2run/tcpip/tcp-ip-illustrated/ftp_file.htm (...
View Full Document
- Spring '12