FTP Commands: APPE, MLSD, MLST, LIST, RETR, STOR, STOU

APPE FTP command

A client issue the APPE command after successfully establishing a data connection when it wishes to upload data to the server. The client provides the file name it wishes to use for the upload. If the file already exists on the server, the data is appended to the existing file. If the file does not exist, it is created.

Common responses:

MLSD FTP command

The MLSD command is a replacement for the LIST command that is meant to standardize the format for directory listings to make them easier for an automated process (an FTP client) to interpret. Like the LIST command, directory information is sent to the client over a previously established data connection. The MLSD command may be accompanied with an optional parameter defining the directory that listings are requested for. Unlike the LIST command, if a filename is provided, an error is returned. For retrieving information on a single file, the MLST command can be used. If no parameter is present, then the user’s current directory is assumed.

Common responses:

MLST FTP command

The MLST command is defined in the IETF working draft Extensions to FTP. It is sent from the client to the server in order to retrieve information about a specific entity. Unlike similar commands used to retrieve information, the response is sent over the command channel. Therefore, no data connection is required to issue this command. The MLST command may be issued with an optional parameter that specifies the entity the server should return information about. If no parameter is provided, then the server must return information about the user’s current directory.

Common responses:

LIST FTP command

The LIST command is issued to transfer information about files on the server through a previously established data connection. When no argument is provided with the LIST command, the server will send information on the files in the current working directory. If the argument specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the argument specifies a file, then the server should send current information about the file.

Advanced options

Serv-U supports the option to return full paths in the LIST command in the command response. Enabling this advanced option allows Serv-U to return the full path when LIST is issued for a specific file. The format is:

-rw-rw-rw- 1 user group 0 Feb 9 09:38 /subdirectory/file.txt

Instead of:

-rw-rw-rw- 1 user group 0 Feb 9 09:38 file.txt

Common responses:

RETR FTP command

A client issues the RETR command after successfully establishing a data connection when it wishes to download a copy of a file on the server. The client provides the file name it wishes to download along with the RETR command. The server will send a copy of the file to the client. This command does not affect the contents of the server’s copy of the file.

Common responses:

STOR FTP command

A client issues the STOR command after successfully establishing a data connection when it wishes to upload a copy of a local file to the server. The client provides the file name it wishes to use for the upload. If the file already exists on the server, it is replaced by the uploaded file. If the file does not exist, it is created. This command does not affect the contents of the client’s local copy of the file.

Common responses:

STOU FTP command

Similar to the STOR command, the STOU command is issued after successfully establishing a data connection to transfer a local file to the server. A file name is provided for the server to use. If the file does not exist on the server, it is created. If the file already exists, it is not overwritten. Instead, the server creates a unique file name and creates it for the transferred file. The response from the server will contain the created file name.

Common responses:

Serv-U Managed File Transfer Server

Email Link To TrialFully functional for 14 days

Let’s talk it over.

Contact our team. Anytime.