Tip 2: Create User Directories
If you want to automatically place authenticated users in their own FTP directories when they log on, you can create a virtual FTP directory with the same name as the user. To create this directory, right-click your FTP server within the Internet Information Services snap-in, then select New, Virtual Directory. Click Next to start the Virtual Directory Creation Wizard. Enter the virtual directory alias, then click Next. (When I created user directories, I chose timh as the virtual directory alias.) Create a folder for your users. (I used the folder C:\inetpub\ftproot\timh that I created in the first tip.) Browse to the folder that you created, and click Next. Select read and write permissions, then click Next. Click Finish.
Now, connect to your FTP server with an FTP client as I described in Tip 1, but this time log on as a domain user instead of as Anonymous. I have a user named timh on my domain, and I used that name to authenticate. In the example that Figure 5 shows, the system automatically placed me in the \timh directory upon authentication, and I received the annotated directory message that I configured in Tip 1.
Tip 3: Limit Access
You can lock anonymous users into an FTP directory so that they can't browse outside it and still enable an authenticated user (who isn't using Microsoft FrontPage) to upload files to the same directory. To limit access, follow these steps:
- In Windows Explorer, place the FTP directory under the \wwwroot directory.
- In the Internet Information Services snap-in, point the FTP server to the FTP directory.
- From the Internet Information Services snap-in, create a second FTP server under the first one and give it the same name as the username of the client who wants to upload files.
- Point the second FTP server to the FTP directory (the same one as in Step 2).
- In Windows Explorer, set the NTFS permissions on the FTP directory to give Anonymous FTP User Full Control on the FTP directory and deny all permissions on the root directory.
After logon, the system places the authenticated user in the virtual FTP site that has the same name. The user has full control over directory content and can upload files. Anonymous users who log on will be able to read the files, but they'll have no control over the files and can't browse outside the virtual FTP directory.
Hosting Multiple FTP Sites on Your Server
Each FTP site has a unique, three-part identity that it uses to receive and respond to requests. That identity consists of
- A TCP port number
- An IP address
- A host header name
When you add a new permutation of any of these three identifiers, you can host multiple FTP sites on one Win2K server. This process is identical to the process by which you set up multiple Web sites on IIS. (For more information about multiple sites on IIS, see Brett Hill, "Multiple Web Sites with IIS 5.0 and IIS 4.0," http://www.iisadministrator.com, InstantDoc ID 9163; and Marnie Hutcheson, "Using Host Headers to Set Up a Multihomed Server," October 1999.)
Administering FTP Sites
Performing administrative tasks on the computer that's running IIS is sometimes inconvenient, so IIS has two remote-administration options. If you connect to your server over the Internet or through a proxy server, you can use the browser-based Internet Services Manager (HTML) to change properties on your site. If you're on an intranet, you can use ISM (HTML) or the Internet Information Services snap-in.
FTP on IIS Is Easy
Configuring an IIS FTP server is a breeze. You don't even have to install and set up an FTP server because IIS installation completes that step for you. With the configuration tips and tricks I've shown you, you can make your FTP site more feature-rich than many FTP sites on the Internet.
Next month, I switch gears to Application Center. I take an in-depth look at Application Center's content-deployment system, which automatically deploys new content to every Web server in the Application Center cluster. Application Center uses CRS, which is a faster, more efficient file-transfer mechanism than FTP and retains permissions when transferring files.
End of Article
Eduardo Gusmao August 23, 2002