How to: Create and Configure FTP Sites in IIS 

File Transfer Protocol (FTP) is a standard protocol for moving files from one computer to another across the Internet. The files are stored on a server computer, which runs FTP server software. Remote computers can then connect using FTP and read files from the server or copy files to the server. An FTP server is similar to an HTTP server (that is, a Web server) in that you can communicate with it using an Internet protocol. However, an FTP server does not run Web pages; it only sends and receives files from remote computers.

You can configure Internet Information Services (IIS) to function as an FTP server. This allows other computers to connect to the server and copy files to and from the server. For example, you might configure IIS to act as an FTP server if you are hosting Web sites on your computer and you want to allow remote users to connect to your computer and copy their files to the server.

NoteNote

Typically, FTP credentials are passed as clear text and not encrypted for transmission. It is recommended that you use FTP with Anonymous or Basic authentication. For more information, see the topics "Securing FTP Sites" and "Authentication Methods Supported in IIS 6.0" in the IIS Technical Reference.

IIS as an FTP Server

In addition to acting as a Web server, IIS can act as an FTP server. The FTP service is not installed by default on IIS. Therefore, to use IIS as an FTP server, you must install the FTP service. For more information about installing and configuring IIS as an FTP server, see the Help documentation that is included with IIS, or see the section "Configuring FTP Sites" in the IIS Technical Reference.

NoteNote

You will need your Windows CD.

To set up an FTP server using IIS

  1. Click the Start button, click Control Panel, and then click Add or Remove Programs.

  2. Click Add/Remove Windows Components.

  3. In the Windows Components Wizard dialog box, if you are running at least Windows Server 2003, select Application Server, and then click Details.

  4. Select Internet Information Services (IIS) and then click Details.

  5. In the Internet Information Services (IIS) dialog box, select the File Transfer Protocol (FTP) Service check box and click OK.

  6. In the Windows Components Wizard dialog box, click Next. If prompted, insert your Windows CD.

    When the installation process is finished, you can use the FTP service with IIS.

Creating Folders

After setting up an FTP server, you need to create a folder structure for the server. By default, the FTP server will have a root folder with the following path: C:\inetpub\ftproot.

The FTP root folder acts as the root for your FTP server in the same way that C:\inetpub\wwwroot is the root for your Web server.

You must create the physical folders where the files will reside. This can either be a subfolder of the FTP root or another folder elsewhere on the computer. Then, you create a virtual root, or alias, that the FTP server will use to point to the physical directory in which files will reside.

To configure an FTP folder and virtual root

  1. Create a new folder to hold files. You can name the folder anything you like. For example, name the new folder ExampleFtpFiles, so that the path of the folder is C:\inetpub\ftproot\ExampleFtpFiles.

  2. In Windows, from the Administrative Tools menu, select Internet Information Services.

    NoteNote

    In Windows XP, you can also right-click My Computer in the Start menu or on the desktop, and then click Manage. In the Computer Management dialog box, open the Services and Applications node.

  3. Open the node for your computer, and then open the FTP Sites node.

  4. Right-click the Default FTP Site node, click New, and then click Virtual Directory.

  5. In the Virtual Directory Creation Wizard, specify an alias (or name) that users can use to get to the FTP folder that you created in step 1. The name can be anything you like. It is often least confusing to use the directory name as the alias name, so that the virtual directory might be called ExampleFtpFiles.

  6. For the path, type or browse to the path of the directory from step 1, for example Inetpub\ftproot\ExampleFtpFiles.

  7. For Access Permissions, specify Read, and then click Next to finish with the wizard.

    NoteNote

    Do not enable Write permissions unless you understand how to secure your IIS FTP server. For more information, see the topic titled "Securing FTP Sites" in the IIS Technical Reference.

Configuring Permissions

You must also grant permissions to users so that they will be able to read and write to the folder.

To establish permissions for the FTP folder

  1. In Windows, from the Administrative Tools menu, choose Internet Information Services.

    NoteNote

    In Windows XP, you can also right-click My Computer in the Start menu or on the desktop and then select Manage. In the Computer Management dialog box, open the Services and Applications node.

  2. Open the node for your computer, open the FTP Sites node, and then open the Default FTP Site node.

  3. Right-click the virtual directory node for the FTP folder that you want (for instance ExampleFtpFiles) and click Permissions.

  4. On the Security tab, select or add your user account and assign Modify permissions.

    This sets NTFS permissions. To specify IP restrictions, right-click the folder name, click Properties, and add restrictions on the Directory Security tab. For more information, see the topics "Access Control in IIS 6.0" in the IIS Technical Reference.

  5. Close the Properties dialog box.

Creating a Web Server Virtual Directory

You typically create a virtual directory for the Web server that maps to the FTP site so that the Web server can access the files in the FTP root. The Web virtual directory name can be the same as the FTP virtual directory name, but this is not required.

To create a Web server virtual directory

  1. In the Internet Information Services dialog box, open the Web Sites node.

  2. Right-click the Default Web Site node, click New, and then click Virtual Directory.

  3. In the wizard, specify an alias that users will use with http:// protocol to access the files in the FTP folder. This can be the same as the FTP alias, for instance ExampleFtpFiles.

  4. For the directory path, type or browse to the path of the FTP directory, for example C:\inetpub\ftproot\ExampleFtpFiles.

  5. For access permissions, select Read and Run scripts.

  6. Click Finish to create the virtual directory and close the wizard.

See Also

Tasks

How to: Create and Configure Virtual Directories in IIS
How to: Create and Configure Local ASP.NET Web Sites in IIS
How to: Install and Configure SMTP Virtual Servers in IIS