Home > Articles > Microsoft > MCSA

  • Print
  • + Share This
This chapter is from the book

Introduction to Internet Information Services

Although most people are aware that Internet Information Services (IIS) enables you to service Web pages from a Windows 2000 server, they don't realize that IIS can be used to serve files and folders via the Web. With the ability to create virtual FTP servers and Web servers with directory browsing, you can extend the reach of your server by providing file support to a broader audience—larger than machines capable of Windows file and printer sharing.

Web Services

Windows 2000 introduced a simple way of sharing folders via the Web in addition to the traditional Microsoft networking that had been available in previous revisions of the operating system. The process of setting up and configuring is not difficult at all.

Setting Up IIS for Web Sharing

Web sharing requires two things. First, you must be running IIS. Second, you must have Administrator or Power User access to your server. The default installation of Windows 2000 Server includes IIS, so it probably is installed on your server. If it is not, you must install it. Step By Step 3.1 outlines the installation process for IIS.

STEP BY STEP 3.1: Installing IIS on a Windows 2000 Server
  1. From the Start menu, select Settings, Control Panel. Double-click the Add/Remove Programs icon.

  2. In the Add/Remove Programs dialog box, click Add/Remove Windows Components.

  3. In the Windows Components Wizard dialog box, select Internet Information Services (IIS) and then click the Details button (see Figure 3.1).

    Figure 3.1Figure 3.1 IIS is installed through the Windows Components Wizard.


  4. From the Internet Information Services (IIS) dialog box, select the following components: Common Files, File Transfer Protocol (FTP) Server, Internet Information Services Snap-In, and World Wide Web Server (see Figure 3.2). Optionally, you also can select Documentation and Internet Services Manager (HTML). The Internet Services Manager (HTML) allows you to administrate most aspects of your IIS server from a browser. When you finish, click OK. Then, click Next in the Windows Components dialog box.

    Figure 3.2Figure 3.2 The IIS components are small; you might want to install them all. Note the options you can choose.


  5. At this point, configuration begins. When you're asked for the CD-ROM, insert it into the drive to complete the installation. When installation is complete, exit the components wizard and the Add/Remove Programs dialog box.

This installation process modifies your server in two ways. First, it creates a folder called Inetpub on your hard drive (on the Boot partition). Second, it creates two local user accounts, one called IUSR_servername (for granting anonymous access to browser clients) and another called IWAM_servername (the account IIS uses internally to start out-of-process applications). The anonymous user account (IUSR_servername) is especially useful because, when you need to control anonymous access to published resources, you will need to refer to this account. Any user who connects to your Web server who is not authenticated will use the user account IUSR_servername and will have whatever access has been given to that account. This account is a member of the local group Guests.

After IIS has been installed, an additional tab appears in the Properties dialog box for your folders; it's called Web Sharing.

Setting Up and Maintaining Web Sharing

Web folders can be made accessible to any or all of the Web sites you have configured on your server; you are not restricted to only the default site. These folders appear as virtual folders on your Web site and are accessible when a user types in addresses similar in format to the following:

http://servername/webfolderalias

Of course, you (or your Web developers) will be able to create HTML links to the folders as well.

Step By Step 3.2 describes the mechanics of sharing a folder via IIS. You must be a member of the Power Users or Administrators group to be able to complete Step By Step 3.2.

STEP BY STEP 3.2: Sharing a Folder via Web Services (IIS)
  1. Right-click the folder you want to share and select Sharing from the menu that appears.

  2. In the Folder Properties dialog box, select the Web Sharing tab (see Figure 3.3).

    Figure 3.3Figure 3.3 Web Sharing is separated from other types of network folder sharing.


  3. In the Share On field, select the site on which you want to share this folder. All the virtual sites you have configured on your Web server will appear in the pull-down list. (You'll learn about virtual servers later in the chapter.)

  4. Select the radio button labeled Share This Folder.

  5. When the Edit Alias dialog box appears, fill in an alias name—the name by which a Web user will be able to reference this Web share (see Figure 3.4). It does not have to be the same as the folder's real name. Then, select one or more access permissions from the four security levels. Read means users will be able to look at content, whereas Write means users will be able to upload into the folder. Script Source Access means users will be able to view the source of script files in the folder, and Directory Browsing means users will be able to browse the folder's contents and its subfolders. Generally, only Read access is given to publicly accessed folders.

    Figure 3.4Figure 3.4 The alias is the name a Web user will use to access the data.


  6. Select an application permission. None means no scripts or applications present in the folder can be run by a browser client; Scripts means script files can be executed. Execute means all programs in the folder can be run by browser clients. If you select the Write Access and Scripts application permissions, a dialog box appears, indicating that you are allowing users to upload scripts they can then run (a potentially dangerous situation). You will be asked to confirm that you really intended to allow that. When you finish configuring these settings, click OK.

  7. If the folder you are sharing resides on a FAT partition, you are done; you can click OK to complete Web sharing. If the folder is on an NTFS partition, however, you need to set NTFS permissions. Click the Security tab at the top of the Properties dialog box.

  8. From the Security tab, add local permissions for all the users you want to allow to access this folder over the Web by clicking the Add button and adding them from the directory of your choice (see Figure 3.5). You can add users and groups as you normally would. However, to allow anonymous users to access the data, you must either explicitly add the IIS anonymous users or implicitly add these users by adding the local group Guests. You must set as much NTFS permissions for any user as you have given out access in step 4. If you gave out Read and Write access, you must also give out Read and Write NTFS permission; otherwise, the lesser of the access levels will prevail for your Web users. Click OK when you are done.

    Figure 3.5Figure 3.5 NTFS permissions are typically used to restrict access to a Web-shared folder.


To modify Web sharing or to stop Web sharing, you can return to the properties for the folder and add a new alias, remove an existing alias, or stop sharing altogether. If you stop sharing, all the aliases for the folder will be removed, and you will have to re-create them if you change your mind.

Web Sharing and Security

Web sharing does not happen in a vacuum. You have to realize that the shared permissions you assign are going to interact with both the local NTFS security you have applied to the shared data as well as the security you have set up for the Web site the folder is shared under.

Similar to shared folder permissions, Web sharing interacts with local security. If Web sharing is configured for a folder on an NTFS partition, the more restrictive of the two permissions will be effective for a Web browser client connecting to the folder. For example, if the anonymous Web user account (IUSR_servername) hasbeen given Read access through NTFS permissions and the folder has been given Web Sharing permissions of Read and Write, a Web browser client connecting to the share will get only Read access (the logical and of the two permissions). If the Guests group is given Full Control through NTFS permissions (thus giving the anonymous Web account Full Control) but you have established only Read access to the Web share, all clients will get only Read access to the data.

In addition to NTFS security, you also need to know what the security is on the whole Web site under which you are sharing. Any browser client trying to get to a Web share must pass through the Web site security before it gets to that share. If the site is secured so that only Read access is allowed—even if Write access is given to the Web share—that access will not be effective for the browser client trying to access the data.

Troubleshooting Web Sharing

A number of things can go wrong with Web sharing. The first major problem is a lack of an IIS server. Without a local IIS server, you will not be able to find the Web Sharing tab on the Properties dialog box for your folder. To solve this, install IIS on your Windows 2000 Server.

After an IIS server has been configured, the next problem might be your permissions to share a folder. You must have Power User or Administrator access to be able to Web share a folder. If your user account is not a member of one of those two groups, you need to gain membership or have someone with the proper rights create the Web shares for you. This shouldn't be a problem because you won't generally be able to log on to the server locally without this level of permissions.

If the folders have been shared, the next problems might be those of access. The major problems are going to be with server access (is the server up, and is the Web service running?) and permissions.

Lack of server access can result from several things. The server itself might not be running. If it is, the Web service might not be running, the Web site in which the folder is being shared might not be enabled, or the TCP port it is running on might not be the default (port 80). Any or all of these things can prevent users from accessing the Web folder you have configured.

Problems related to the server being down (that is, the operating system is not running) are beyond the scope of this particular discussion. The bottom line is that the server must be running to provide access to your Web folders.

If the Web service itself is not running, you can start it by following Step By Step 3.3.

STEP BY STEP 3.3: Starting the World Wide Web Publishing Service
  1. From the Start menu, select Programs, Administrative Tools, Services.

  2. Scroll down the Services list until you find World Wide Web Publishing Services. Right-click it and select Start from the menu that appears.

  3. Close the Services console.

If the Web service is running, the problem might be that the Web site is not running. To start it, you need to open the IIS Services Manager Console. Step By Step 3.4 leads you through the process of starting a Web site.

STEP BY STEP 3.4: Starting a Web Site
  1. From the Start menu, select Programs, Administrative Tools, Internet Services Manager.

  2. In the IIS Console window, you can locate your Web sites by expanding the Console Root, Internet Information Services, and your server. When you see your Web site in the tree under the name of your server, right-click it and select Start from the menu presented.

  3. Close the IIS Console.

Finally, even if the Web site is up, if the administrator of the site has configured access on a TCP port other than the default (80), Web users will not be able to get to the Web site without specifying the new port in the URL. For the purposes of this discussion, a TCP port can be thought of like a TV channel. You might have your TV on, but if it is not tuned to the right station, you will not be able to get to the program you want. All browsers are configured to access Web sites on port 80. If the Web server is not "listening" on port 80, either the server needs to be changed or the browser has to be told which port to connect on. If the port is not 80 and you want Web users to connect, you can give them the port number. Then, they will be able to connect using the following syntax:

http://servername:portnumber/foldername

For example, to connect to the folder Accounting on a server called Win2000S using the port 8080, you would use the following syntax:

http://Win2000S:8080/Accounting

To find out what the port is or to change it, follow Step By Step 3.5.

STEP BY STEP 3.5: Discovering and Changing a Web Server's TCP Port
  1. From the Start menu, select Programs, Administrative Tools, Internet Services Manager.

  2. In the IIS Console window, you can locate your Web site by expanding the Console Root, Internet Information Services, and your server. When you see your Web site in the tree under the name of your server, right-click it and select Properties.

  3. In the Web Site Properties dialog box, the Web Site tab contains a field called TCP Port (see Figure 3.6). That number is your TCP port number. If you change that, all browsers (and HTML links coded into pages) will have to explicitly use that TCP port number. Therefore, it is not a good idea to change it without first consulting your Webmaster to discuss the implications.

    Figure 3.6Figure 3.6 The TCP port number can be used to effectively hide a Web site from those who do not know the number.


  4. Click OK to update the Web site's properties.

When a user is able to connect to your Web site, the issue of permissions might still come up. Remember from the discussion in the last section that all the levels of permissions interact to form an effective permission. As a result, you must check permission levels at the NTFS level, the Web folder level, and the Web site level. Thus far, the only one of these three that has not been discussed is the Web site level.

File Transfer Protocol Services

In addition to Web services, IIS also enables you to serve files via the File Transfer Protocol (FTP). FTP predates the HTTP protocol the Web uses and is an efficient way to send files between two systems. In fact, FTP was designed specifically for file transfer. It's still frequently used to distribute software and updates. Although the HTTP (Web) protocol is now being used more than FTP, FTP is still the real workhorse for transferring files.

From a practical perspective, there are only a few things you need to know about FTP servers in comparison to Web servers:

  • FTP servers originally were accessed via command-line utilities, like the FTP utility included in Windows NT/2000. Although all modern Web browsers support FTP, you can continue to use dedicated FTP utilities.

  • FTP has far fewer configuration options than a Web server because the server provides a much simpler, more focused utility.

  • FTP servers can't use any encryption. Because of this, they are sometimes configured for anonymous access only.

  • FTP servers generally use TCP port 21—not TCP port 80 like Web servers do. This means a different set of rules on the firewall to allow FTP traffic.

FTP servers are definitely not as glamorous as Web servers, but they get the job done.

  • + Share This
  • 🔖 Save To Your Account