This article explains the use of FTP commands HOST, ALLO, PROT, STRU, TYPE, AUTH, CCC
All Serv-U versions
HOST FTP command
HOST command specifies what domain on a server the client is connecting to. Serv-U supports the use of Virtual Hosts to configure more than one domain on the same listener - in this case, Serv-U relies on the
HOST command to determine what domain a client is connecting to. If the client does not issue the
HOST command when connecting to the server, Serv-U will use the first domain configured on that listener.
ALLO FTP command
ALLO command may be sent to a server that requires the necessary space for an uploaded to be reserved before the transfer takes place. The argument shall be a decimal integer representing the number of bytes (using the logical byte size) of storage to be reserved for the file. A server that does not require space to be reserved in advance should treat the command as a NOOP operation.
500, 501, 504, 530
PROT FTP command
After successfully negotiating a protection buffer size, 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 the following:
PROT command is issued, the data channel will be clear and raw data will be transferred over the data channel. For complete security, a level of Private should be used which encrypts the data channel and ensures its integrity. Supported levels of protection are defined by the security mechanism specified in the
AUTH command that initially secured the command channel. Not all levels of protection may be supported by each security mechanism.
STRU FTP command
STRU command is issued with a single Telnet character parameter that specifies a file structure for the server to use for file transfers.
The following codes are assigned for structure:
F - File (no record structure)
R - Record structure
P - Page structure
FILE is the default structure used if there is no
STRU command issued.
TYPE FTP command
TYPE command is issued to inform the server of the type of data that is being transferred by the client. Most modern Windows FTP clients deal only with type A (ASCII) and type I (image/binary).
Text data is usually transferred as type ASCII so that the server knows to convert the data according to its local storage specifications (relevant when transferring across platforms such as from a Windows client to a Linux server or vice versa). Auto-ASCII is a commonly supported FTP client feature that automatically manages the changing of the representation type based upon the extension of the file the client is transferring.
AUTH FTP command
AUTH command is used to initialize a secure connection to the connected FTP server. Included with this command is a case-insensitive parameter defining the security mechanism that the client is requesting to use to secure the session. Example security mechanisms used by popular FTP clients are SSL and TLS. This command should be followed by a
USER command to authenticate the access to the server after establishing a secure channel. This command is not used to secure the connection if secure connections are implicitly required by the server (usually done by allowing connections on port 990).
AUTH FTP command
CCC command is useful on client's requiring the usage of active (
PORT) mode data transfers when they are behind a router that implements NAT. This command allows NAT to function on the router so that it can continue to "follow" the FTP transaction and alter the
PORT command with an external IP address while preparing for the server's inbound connection on the port specified in that