In the Serv-U File Server, you can customize the FTP commands that Serv-U accepts, and you can also customize the responses of Serv-U to the FTP commands it receives. If you configure these options at the server level, all domains inherit the customizations. To customize the FTP behavior for a specific domain, select the appropriate domain, open the FTP Settings page for the domain, and then click Use Custom Settings. At any time, you can click Use Default Settings to have the domain revert back to the default settings of the server.
Warning: Customizing the FTP behavior in this way is not recommended except for those very familiar with the FTP protocol and its standard and extended command set.
When using custom settings, the Global Properties button becomes available.
Global FTP responses are responses shared amongst most FTP commands, such as the error message sent when a file is not found. Customizing a global FTP response ensures that the response is used by all other FTP commands rather than having to customize it for each individual FTP command. FTP command responses can contain special macros that allow real-time data to be inserted in to the response. For more information, see System variables.
The server welcome message is sent in addition to the standard "220 Welcome Message" that identifies the server to clients when they first connect. If the Include response code in text of message file option is selected, the 220 response code begins each line of the specified welcome message. To customize the welcome message, enter the path to a text file in the Message File Path field. Click Browse to select a file on the computer. Serv-U opens this file and sends its contents to connecting clients.
Block "FTP_bounce" attacks and FXP (server-to-server transfers): Select this option to block all server-to-server file transfers involving this Serv-U File Server by only allowing file transfers to the IP address in use by the command channel. For more information about FTP_bounce attacks, see CERT advisory CA-97.27.
Include response code on all lines of multi-line responses: The FTP protocol defines two ways in which a multi-line response can be issued by an FTP server. Some older FTP clients have trouble parsing multi-line responses that do not contain the three-digit response code on each line. Select this option if your clients are using an FTP client experiencing problems with multi-line responses from Serv-U.
Use UTF-8 encoding for all sent and received paths and file names: By default, Serv-U treats all file names and paths as UTF-8 encoded strings. It also sends all file names and paths as UTF-8 encoded strings, such as when sending a directory listing. Deselecting this option prevents Serv-U from UTF-8 encoding these strings. When this option is deselected, UTF-8 is not included in the FEAT command response to indicate to clients that the server is not using UTF-8 encoding.
To edit FTP Commands, select the FTP command you want to change, and then click Edit.
On the Information page, basic information about the command is shown along with a link to more information on the Serv-U website. Each FTP command can also be disabled by selecting the Disable command option. Disabled commands are treated as unrecognized commands when they are received from a client.
On the FTP Responses page, all possible FTP responses to the command as issued by the server can be modified by clicking Edit for each response. FTP command responses can contain special macros that allow real-time data to be inserted in to the response. For more information, see System variables.
Certain FTP commands allow a message file to be associated with them. The contents of a message file are sent along with the standard FTP response. In addition, a secondary message file path is available as a default option. This allows for message files to be specified using a path relative to the home directory of the user for the Message File. If the first message file is not found, Serv-U attempts to use the Secondary Message File instead. By specifying an absolute file path in the secondary location, you can ensure that each user receives a message file.
The following FTP commands can be used for specifying a message file:
Managing Recursive Listings
Serv-U supports recursive listings by default, allowing FTP clients to obtain large directory listings with a single command. In some cases, clients may request excessively large directory listings using the -R parameter to the
NLST commands. If performance in Serv-U is impacted by users requesting excessively large listings, recursive listings can be disabled by using the Allow client to specify recursive directory listings with -R parameter option.
Some FTP commands contain advanced configuration options that offer additional ways to configure the behavior of the command. Where available, the configuration option is described in detail in the Management Console. The following FTP commands contain advanced configuration options:
Users connecting to the server need to know how much quota space is available in a given folder when they have completed a transfer. To do this, edit the response to the
STOR command to include a report about available space. By default, the 226 (command successful) response to the
STOR command (which stores files on the server) is the following:
Transfer complete. $TransferBytes bytes transferred. $TransferKBPerSecond KB/sec.
Modify this to include an extra variable in the following way:
Transfer complete. $TransferBytes bytes transferred. $TransferKBPerSecond KB/sec. Remaining storage space is $QuotaLeft.
The last sentence shows the user how much storage space is left at the end of each file upload. The same can be done for the
DELE command, so that every time a user deletes a file, their updated quota value, showing an increase in available space, is displayed. This can be done for any FTP command response.