FTP Commands used in SyncBack

This article provides a reference for the various FTP commands sent from SyncBack to your FTP server during the process of establishing the connection and transferring the data to the server.


FTP COMMANDS
DESCRIPTION
AUTH
The AUTH command is issued by the client to the server to specify the authentication mechanism name to be used for securing the FTP session (Auth SSL/TLS).
 
When both client and server support SSL or TLS, then the security is accomplished through a sequence of commands passed between the client and the server.
CLNT
This command is used to provide the information about client software to server. This command serves no functional purpose other than to provide information to the server.
DELE
The DELE command is used to delete the specified file from the server.
EPRT
The EPRT command is issued by the client to initiate a data connection required to transfer data between the client and server.
 
When issuing the EPRT command, the client will include information on the address and port that the server is to use in order to connect back to the client.
The structure of the EPRT command is: EPRT |AF|Network Address|Port
AF - The AF indicates the version of Internet Protocol used by the connection. 1 represents IPv4, 2 represents IPv6.
Network Address - The Network Address is the IP Address of the client, either IPv4 or IPv6 depending on the AF.
Port - The port number for the server to connect on
EPSV
This command tells the FTP server to enter Passive FTP mode instead of Active mode. This allows users behind the firewall/router to connect to the FTP server when they are not able to connect using Active FTP session.
 
When issuing the EPSV command, the client will include information of the port that the server has to use in order to connect back to the client.
FEAT
This command is used by the FTP clients to ask for the list of features supported by the FTP server.
 
If the FEAT command is supported by the FTP server, then it will reply with a multi-line response where each line of the response contains an extended feature command supported by the server.
LIST
This command is used to get the information about the files/directories on the server through a previously established connection.
 
When LIST command is called without arguments then, the server will send information about the files in the current working directory.
 
If the argument specifies a directory, then the server should send the information about the list of files in the specified directory.
If the argument specifies a file, then the server should send current information about the file.
MDTM
This command is used to get the file’s modification date/time information, but some FTP servers also support setting file’s last modified date/time information using MDTM command.
 
Traditionally, when a file is uploaded to an FTP server, it will get stamped with the date/time transferred to it. However, MDTM command is used to preserve the files’ original date/time information
MFCT
This command is used to modify a file or folder's creation date and time information.
 
Traditionally, when a file is uploaded to an FTP server, the creation date and time of the file or folder is set to the transfer date and time. Using MFCT, FTP clients can inform supporting FTP servers of the proper creation date and time to use for the file or folder.
MFMT
This command is used to set the last modified date/time information of a file or folder.
 
FTP clients use MFMT command to inform supporting FTP servers of the correct last modified date and time information to use for the file or folder.
MLSD
This command is used to return the directory listing information to the FTP client through a previously established connection.
 
The MLSD command is a replacement for the LISTcommand to standardize the format for directory listings.
MLST
This command is sent from the FTP client to the FTP server to retrieve the information about a specific entity
 
The MLST command can be issued with an optional parameter to specify 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.
MODE Z
This command changes the transfer mode when transferring files from FTP client to FTP server.
 
The following are the transfer modes with their codes:
S – Stream (default option)
B – Block
C – Compressed
Z – Deflate (commonly referred to as "on-the-fly" compression)
OPTS
The OPTS command is used to provide additional information for extended features supported by the FTP server. The OPTS command will be followed by the name of the command requiring additional information.
 
MODE - FTP client will issue an OPTS MODE command to FTP server to configure extended options for a given transfer mode.
 
UTF8 – FTP client will issue OPTS UTF8 ON/OFF command to configure the server to enable (ON) or disable (OFF) UTF-8 encoding which is useful for non-ANSI character sets.
PASV
This command tells the FTP server to enter Passive FTP mode instead of Active mode. This allows users behind the firewall/router to connect to the FTP server when they are not able to connect using Active FTP session.
PBSZ
After establishing a secure connection with the server, FTP client issues the PBSZ command. This command sets the maximum size, in bytes, of the encoded data blocks to be sent or received during file transfer.
PROT
After negotiating a protection buffer size (using the PBSZ command), an FTP client might issue the PROT command. The PROT command is used to specify the level of protection used on the data channel.
 
The four levels of protection (in order of security) are defined as "Clear", "Safe", "Confidential", and "Private".
PWD
This command displays the current working directory on the server for the logged in user.
REST
The REST command is used to specify an indicator to the server for the purpose of resuming a file transfer. The server will use the indicator specified in the REST command to resume file transfer at the specified point.
 
After issuing a REST command, the client must send the appropriate FTP command to transfer the file.
RNFR
This command is used to rename the file on the server. RNTO command will immediately follow the RNFR command.
RNTO
This command is used to specify the new name for a file specified in a preceding RNFR (Rename From) command.
SITE UTIME
This command is used to set the time and date attributes of a file on the server.
SITE CHMOD
This command that changes the mode of a file. There are three modes which can be either enabled or disabled: read, write and execute. Each mode can be set for either the owner, the members of the owner's group, or all users.
SIZEThis command returns the number of bytes that would be sent over the data connection during the transfer of the specified file. Thus, the result of the SIZE command is dependent on the currently established STRU, MODE and TYPE parameters.
STOR
This command is issued by the client after successfully establishing a data connection and when it want to upload a copy of a local file to the FTP server.
 
The client provides the file name 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.
XCRC
This command is used to ask the FTP server to perform a cyclic redundancy check using the CRC-32 algorithm on the specified file.
 
FTP clients can use this command to verify that the file was transferred without corruption by comparing the server's response with its own calculation.
XMD5
This command is used to ask the FTP server to perform a cyclic redundancy check using MD5 algorithm on the specified file.
 
FTP clients can use this command to verify that the file was transferred without corruption by comparing the server's response with its own calculation.


Note that this article provides a general description about FTP commands used in SyncBack. If you require additional information about a specific command or information about other FTP commands, please refer to your FTP manual for further details.


You may also find the following article useful:


https://www.2brightsparks.com/resources/articles/essential-ftp-features.html