Because the post-logon phase of an FTP server session is so extensive, additional determination must be done in order to narrow down the types of problems a user might encounter (click here to skip the tutorial section). The biggest division of problems in this phase can be broken into two categories:
The control connection is the primary connection for the FTP server session. By default, the control connection is opened between an emphemeral port on the client system, and port 21 on the server system. This is the first connection to be established in the session, and is used by the server to receive the client's commands and to send to the client responses to those commands. A list of client subcommands which use the control connection can be reviewed here. Note that not all of these subcommands will generate commands to the FTP server. The types of problems for which one might investigate the control connection include (but are not limited to) things such as:
The data connection is the secondary connection of an FTP session. The data connection is opened between the FTP client and server whenever non-command or non-reply data is to be transferred. By default, the data connection is opened between an ephemeral port on the client system and port 20 on the server system. A single FTP session may have multiple data connections, as one connection is opened and closed every time a single data transfer occurs. Additionally, an FTP session may have no data connections (for example, if a user were to log on and immediately log off without transferring any data).
P> Though the connection is initiated by commands, these commands and the server's reply to them are still sent across the control connection. As such, no commands or replies will ever be seen on the data connection. Instead, only raw data is transferred across this connection. For example, a command to retrieve a file from the FTP server is sent across the control connection. The server's replies, indicating that the command was accepted, that data is being transferred, or that a transfer has completed are also sent across the control connection. However, the actual file's data is transferred across the data connection. A list of commands which initiate the transfer of data across a data connection can be reviewed here. The types of problems for which one might investigate the data connection include (but are not limited to) things such as: