Setting FTP Messages and Directory Output Style

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2, Windows Server 2008

By default, the IIS FTP service sends a banner message that identifies the FTP service, and the fact that FTP runs in IIS, to the client. The message can be a greeting that welcomes users to the FTP site when they log on, an exit message (see note) that users see when they log off, a message that informs users when the maximum number of connections has been reached, or a banner message. Also, you can send the client informational messages about your FTP sites. The message can be a greeting, an exit message, or information about connection status. These messages are blank by default.

Important

You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /User:MyComputer\Administrator cmd to open a command window with administrator rights and then type cscript.exe ScriptName (include the script's full path and any parameters).

Procedures

To suppress the default FTP banner for all FTP sites on a computer

  1. From the Start menu, click Run.

  2. In the Open box, type cmd and click OK.

  3. At the prompt, type the following command and then press ENTER:

    Cscript.exe adsutil.vbs SET MSFTPSVC/SuppressDefaultFTPBanner true

Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /User:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc".

To globally set messages on all FTP sites

  1. In IIS Manager, expand the local computer, right-click the FTP Sites folder, and then click Properties.

  2. Click the Messages tab.

  3. Type messages in any of, or all of, the Banner, Welcome, Exit, and Maximum connections boxes. These messages will appear on all FTP sites.

  4. Click Apply, and then click OK.

To set messages on a specific FTP site

  1. In IIS Manager, right-click the FTP site for which you want to change messages, and then click Properties.

  2. Click the Messages tab.

  3. Type messages in any of, or all of, the Banner, Welcome, Exit, and Maximum connections boxes. Messages set at the individual FTP site level override messages set at the global level.

  4. Click Apply, and then click OK.

Setting the Directory Output Style

You can set the directory output style of all FTP sites, or an individual FTP site to be in either MS-DOS® or UNIX format. The directory output style defines the format that is used when an FTP client sends a /list command. The default directory output style is MS-DOS format.

Note

Although the exit message box can contain up to 30,000 characters, the FTP exit message size is limited to 1024 characters, including the reply code, blank, carriage return, and null. To prevent the exit message from being truncated, limit the length of the exit message to 1017 characters.

The UNIX directory listing style displays the year in a four-digit format when the year in the date of the file is different from the year in the date of the FTP server. No year is returned in cases where the year in the date of the file is the same as the year in the date of the FTP server.

To set the global FTP directory output style

  1. In IIS Manager, right-click the FTP Sites folder, and then click Properties.

  2. Click the Home Directory tab.

  3. Under Directory listing style, click UNIX or MS-DOS®

  4. Click Apply, and then click OK.

To set the FTP directory output style for an individual FTP site

  1. In IIS Manager, expand the FTP Sites folder, right-click the FTP site for which you want to change the directory listing style, and then click Properties.

  2. Click the Home Directory tab.

  3. Under Directory listing style, click UNIX or MS-DOS®. The output style set at the individual FTP site level overrides the output style set at the global level.

  4. Click Apply, and then click OK.

Note

The MS-DOS directory listing style displays the year in a two-digit format by default. You can change this setting to display the year in a four-digit format.

  • For information about installing the FTP service, see FTP Site Setup.