FTP Server Command Reference

Note: This section applies to the Cleo Harmony and Cleo VLTrader applications only.

The FTP Server allows users to log into the Cleo Harmony or Cleo VLTrader application and store and retrieve files using standard FTP (File Transfer Protocol) commands. A full description of the FTP commands is available in the RFC 959 specification. More detail on the FTP Security Extensions is available in RFC 2228.

The following FTP commands are accepted and processed by the Cleo Harmony or Cleo VLTrader FTP server.

Access Control Commands

Command Description
USER <username> Identifies the user to the FTP server. The <username> parameter is a string that must match one of the users previously entered into the Cleo Harmony or Cleo VLTrader application.
PASS <password> Verifies the identity of the user, since only specified user should know the password. The <password> parameter is a string specifying the user’s password. This command must be immediately preceded by the USER command.
PASS <password>/<newPassword>/<newPassword>/   Verifies the identity of the user and changes the user’s password. The <password> parameter is a string specifying the user’s current password and <newPassword> is a string specifying the user’s new password. This command must be immediately preceded by the USER command. The password must follow the configured password policy or the login will be considered a failure.
ACCT <account> Specifies the user’s account. This command is not required, and has no effect on the logon process.
CWD <pathname> Changes the current working directory to that specified by <pathname>. If <pathname> starts with a slash, the path is considered to be an absolute path. Otherwise, it is a path relative to the current working directory.
CDUP Changes the current working directory to the parent of the current working directory. This can also be accomplished with the CWD command.
QUIT Terminates the USER and closes the connection.

Transfer Parameter Commands

Command Description
PORT <host-port> This command and the <host-port> argument specify the data port to be used in data connection. The <host-port> argument is the concatenation of a 32-bit internet host address and a 16-bit TCP port address. This address information is broken into 8-bit fields and the value of each field is transmitted as a decimal number in character string representation. The fields are separated by commas. An example PORT command might be:

PORT h1,h2,h3,h4,p1,p2

where h1 is the high order 8 bits of the internet host address. This address and port are created by the client side and the server connects to the client’s data port.

PASV Requests the server to "listen" on a data port and to wait for a connection. The response to this command includes the host and port address this server is listening on.
TYPE <type-code> Specifies the data representation type. The <type-code> is either A (for ASCII) or I (for Image). Other values for <type-code> are not supported.
STRU <structure-code> Specifies the structure of the transferred file. The <structure-code> is either F (for File) or R (for Record). Other values for <structure-code> are not supported. This command has no effect on the files stored.
MODE <mode-code> Specifies the data transfer mode. Only S (for Stream) is supported.

Service Commands

Command Description
RETR <pathname> Causes the server to send the file specified by <pathname> from the server to the client on the data connection.
STOR <pathname> Causes the server to accept the data transferred through the data connection and to store the data as a file with name <pathname> at the server site.
STOU Causes the server to accept the data transferred through the data connection and to store the data as a file with a unique filename at the server site.
APPE <pathname> Causes the server to accept the data transferred via the data connection and to store the data in a file specified by <pathname> at the server site. If the file specified in the pathname exists at the server site, then the data is appended to that file; otherwise, the file specified in the pathname is created at the server site.
RNFR <pathname> Specifies the old pathname of the file/directory which is to be renamed. This command must be immediately followed by a "rename to" (RNTO) command specifying the new file pathname.
RNTO <pathname> Specifies the new pathname of the file/directory specified in the immediately preceding "rename from" (RNFR) command. Together the two commands cause a file/directory to be renamed.
DELE <pathname> Causes the file specified by <pathname> to be deleted at the server site.
RMD <pathname> Causes the directory specified in <pathname> to be removed as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative).
MKD <pathname> Causes the directory specified in <pathname> to be created as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative).
PWD Causes the name of the current working directory to be returned in the reply.
LIST<pathname> Causes a list to be sent from the server to the client. If <pathname> specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A missing <pathname> argument implies the user's current working or default directory. The details of the files are returned in Unix format not matter which platform the server is running on.
NLST <pathname> Causes a directory listing to be sent from server to client. The <pathname> should specify a directory or other system-specific file group descriptor; a missing <pathname> argument implies the current directory. The server will return a stream of names of files and no other information. The data will be transferred over the data connection as valid pathname strings separated by <CRLF>. This command is intended to return information that can be used by a program to further process the files automatically.
SITE <string> Used by the server to provide services specific to his system that are essential to file transfer but not sufficiently universal to be included as commands in the protocol. Currently, there are no available SITE commands.
SYST Used by the client to determine the system type on which the server resides. If the system type is Windows, then a system type of WIN32 is returned. Otherwise, Unix is returned.
STAT <pathname>

Status (not available during Transfer)

Causes a status response to be sent over the control connection in the form of a reply. Unlike the RFC 959 description of STAT, this command cannot be sent during a file transfer. However, this command can be sent between file transfers. If a <pathname> is specified, the command is analogous to the "list" command except that data is transferred over the control connection. If a wild-carded pathname is given, the server can respond with a list of file names and attributes associated with that pathname. If <pathname> is not given, the server returns general status information about the server FTP process. This includes current values of all transfer parameters.

HELP <string> Causes the server to send helpful information regarding its implementation status over the control connection to the user. The command takes an optional argument (for example, any command name) and returns more specific information as a response.
NOOP Does not affect any parameters or previously entered commands. It specifies no action other than that the server return an OK reply.

Security Extensions

Command Description
AUTH <mechanism>

The <mechanism> parameter specifies a security mechanism. This command is only available on the FTP/s Explicit ports.

  • SSL or TLS-P protect the control/data channels
  • TLS or TLS-C clear the protection of the control/data channels

It is suggested that AUTH SSL be specified for a secure connection and that this command would not be issued for the clear channel case.

PROT <level> The <level> parameter specifies the Data Channel Protection Level. Values of C (for Clear) or P (for Private/Encrypted) are supported.
PBSZ <size> Allows the FTP client and server to negotiate a maximum protected buffer size for the connection. A <size> of 0 (zero) is the only allowed size.
CCC Sets a protected command channel to clear-text.

FTP Extensions

Command Description
EPORT |<net-prt> <net-address>|<tcp-port>|

Allows for the specification of an extended address for the data connection. The network protocol field (<net-prt>) specifies format used for the <net-address> field. The <tcp-port> field specifies the client data port to use. A delimiter character (typically |) separates the fields. Example commands for IPv4 and IPv6 formats would be:

IPv4:       
EPRT |1|192.136.4.34|1964|
IPv6:       
EPRT |2|1677::3:670:45AC:76B3|1959|
MDTM <pathname> Returns the file modification time of the file specified by <pathname>.
SIZE <pathname> Returns the size, in bytes, of the file specified by <pathname>.
XMKD Same as MKD.
XPWD Same as PWD.
FEAT Returns the list of supported extended commands (such as commands beyond those originally described in RFC 959).
OPTS Allows optional command parameters to be set or reset. The Cleo Harmony and Cleo VLTrader applications currently do not offer any optional command parameters.
REST <position> The REST command must be the last command issued before the data transfer command that is to cause a restarted, rather than a complete, file transfer.  The <position> parameter specifies where the transfer is to be started. STREAM mode is supported (Block and Compressed are not).