- MCSE 2.1 File and Folder Access
- MCSE 2.2 Shared Folder Access
- MCSE 2.3 Working with Print Devices
- MCSE 2.4 Working with File Systems
- Summary
MCSE 2.2 Shared Folder Access
Users can access the folders resident on your computer if you make them available over the network via sharing. You can share folders regardless of the file system under which they are stored: FAT, FAT32, NTFS, Compact Disk File System (CDFS) or DVD's Universal Disk Format (UDF). Like local folders created under NTFS, access to shared folders is controlled through permissions. Unlike with NTFS however, share permissions only affect those accessing a folder over the network. NTFS permissions always apply in either case.
Only members of the Administrators, Server Operators, Power Users, or Users groups can create network shares.
Creating Shared Folders
Sharing cannot be done at the individual file level. It can be done only at the folder level. The share access level of each parent folder is automatically passed on to the subfolders within it. Therefore, you must be careful to not place a folder with strictly limited access under a parent folder with open access, or vice versa. Keep security in mind.
Sharing a Folder Locally
When you share a folder locally, you are logged onto the workstation on which the folder that you want to share exists.
To begin, select the folder, right-click, then select the Sharing command to open the Properties dialog box, as shown in Figure 2.10. The following choices are listed under the Sharing tab of the Properties dialog box:
Figure 2.10 Sharing a folder.
Share this folder. This radio button shares the resource across the network.
Do not share this folder. This radio button stops sharing the resource.
Share name. In this field you can enter the name users will see when they are browsing the resources that your computer is advertising on the network. This network name need not match the folder's local name. If you will have DOS or Windows 3.x users, you must use the 8.3 naming convention.
Comment. When users are browsing the resources on the machine, they will see the comment you enter in this field next to the share. This is a handy place to describe your share's purpose or physical location.
User limit. These radio buttons allow you to limit the number of inbound connections for performance reasons. Windows 2000 Professional has a built-in limit of 10 inbound networking connections, so really you may limit users to 10 or less here.
Permissions. This button allows you to set individual user and group permissions for access to the share. All subfolders inherit the same permissions.
Caching. This button permits a remote user to download a copy of the share to his local computer for access when your share is unavailable, such as when the remote user is offline or your computer is shut down. After clicking this button to open the Caching Settings dialog box, you may choose to permit either the automatic or manual caching of documents and programs, as shown in Figure 2.11.
Figure 2.11 Enabling shared folder caching.
The Automatic Caching for Documents setting downloads every file that a user opens from your shared folder for that user's offline access. The Automatic Caching for Programs setting applies to the contents of shares that do not change. The Manual Caching for Documents setting, the default, only caches those files specifically selected by the remote user. If you wish to retain all versions of cached files, assign only the Read permission to them.
Removing Shared Folders
To stop sharing a shared folder, perform the following steps:
Right-click the folder and select Sharing.
Click the Do not share this folder radio button.
If you want to add a level of security, you can go beyond disabling your shared folders to disabling your computer's ability to share files at all.
To do this, simply open the Services Control Panel application and turn off the Server service, as shown in Figure 2.12.
Figure 2.12 Disabling the Server service.
Working with Permissions
Click the Permissions button in the share Properties dialog box to establish share permissions, as shown in Figure 2.13. You can allow or deny the following three levels of access in Windows 2000:
Figure 2.13 Setting share permissions.
Read. This allows users or groups to use programs contained within shared folders, and to view documents. They cannot make changes to the documents, however.
Change. This permission allows all the permissions included with the Read access level. In addition, it allows users and groups to add files or subfolders to the share, and to add or delete information from existing files and subfolders.
Full Control. This is the default permission given by Windows 2000 when a share is created. A user or group with Full Control permissions can perform all tasks allowed by the Change permission, as well as modify file permissions and take ownership of files.
Click the Add button to change the default permissions and explicitly add additional users and groups, as shown in Figure 2.14. Next, choose the access level you want to assign to that user or group. The default is Read access. To further secure the share, you may remove the Full Control permission granted to Everyone by default.
Figure 2.14 Adding additional users/groups.
To set up permissions on shared directories effectively and responsibly, you have to know what those permissions really mean across the network. Because users and groups can each be given varied share permissions, a user could potentially have different share permissions than his group. The potential problem is exaggerated if the user belongs to more than one group. When users and groups have different share permissions, Windows 2000 defaults to the least restrictive one. Therefore, a user with Read permissions who is also a member of a group with Full Control access is granted Full Access permissions.
The one exception to this rule comes into play when permissions are explicitly denied. A user with a denied permission is not granted the restricted access to a shared resource even if he is a member of a group with greater access.
A user with a certain level of access who is a member of a group with no specified access maintains his specific permission level. This makes the following true where User A is member of Group B:
If User A is allowed Read access and Group B is allowed Full Control access, then User A is allowed Full Control access.
If User A is allowed Change access and Group B is allowed Read access, then User A is allowed Change access.
If User A is denied Full Control access and Group B is allowed Full Control access, User A is still denied Full Control access.
If User A is allowed Change access and Group B is denied Change Access, then User A is denied Change access.
If User A is allowed Read access and Group B has no defined permissions, then User A is still allowed Read access.
If User A has no defined permissions and Group B is allowed Change access, then User A is allowed Change access.
The tasks that can be performed with each standard share permission are listed in Table 2.4. (These tasks are file system-specific, so you cannot perform the Take Ownership or Change Permissions tasks unless you are working from an NTFS partition.)
Table 2.4 Tasks Performed Using Share Permissions
Task |
Full Control |
Change |
Read |
Traverse folder |
Yes |
Yes |
Yes |
View file/subfolder names |
Yes |
Yes |
Yes |
View data in files/run programs |
Yes |
Yes |
Yes |
Change data in files |
Yes |
Yes |
No |
Add files/subfolders to share |
Yes |
Yes |
No |
Delete subfolders and files |
Yes |
Yes |
No |
Take ownership |
Yes |
No |
No |
Change permissions |
Yes |
No |
No |
You can get a quick view of the folders currently shared on your computer by launching the Microsoft Management Console (MMC) through the Computer Management shortcut in the Administrative Tools program group. Select the Shared Folders item in the Tree pane, as shown in Figure 2.15.
Figure 2.15 Viewing all shares.
Here you may view the shares you create, as well as "hidden" administrative shares used by the operating system (e.g., C$, etc.) that do not appear shared in My Network Places or My Computer.
You may also see which users have initiated sessions with your server and which files they have open.
Share vs. NTFS Permissions
When folders have NTFS permissions that differ from folder share permissions, Windows 2000 grants the most restrictive of the two. If a user has Read access to a share, that user will have Read access when opening the folder over the network even if the user has Full Control access when opening the folder locally on the workstation.
Connecting to Shared Folders
Finding and using resources on remote machines is a fundamental element of networking. The Universal Naming Convention (UNC) allows you to follow a path to a computer and a resource, and the My Network Places allows you to see a list of the computers on the network.
Using My Network Places
The Network Neighborhood icon appears on your desktop if your workstation has a network adapter installed. When you double-click the icon, it gives you the option of establishing a shortcut to regularly used resources with the Add Network Place wizard or browse the entire network, as shown in Figure 2.16.
Figure 2.16 Opening My Network Places.
Select the Entire Network icon, and you are given the choice to search for networked computers, file and folders, or see the network's entire contents. Choose the latter, then click the Microsoft Windows Network icon to view a graphical representation workgroups, domains, and workstations in the browse list, as shown in Figure 2.17.
Figure 2.17 Viewing the Microsoft Windows Network browse list.
The browse list is maintained by the network computer that has been designated as Master Browser. The browse list is constantly kept up-to-date because every computer on the network with an active Server service registers its name with the Master Browser.
Click on a remote computer's icon to see the folders it has shared, as shown in Figure 2.18.
Figure 2.18 Viewing remote shares.
If you plan to access a networked share regularly, you can make it appear as a local hard drive by right clicking and choosing the Map Network Drive command. The share then appears with its own drive letter.
Using the Universal Naming Convention
You can also use the UNC to specify a share name on a specific computer, such as through the shown in Figure 2.19.
Figure 2.19 Locating a resource by UNC path.
A connection made through a UNC path takes place immediately and does not need a drive letter. The UNC path looks like this:
\\server_name\share_name
UNC connections can also connect to network printers. The format is:
\\server\printer
If a share name has a dollar sign at the end of it, the share becomes hidden and does not appear in listings, although you can still access it through its UNC name.
If you are using a 16-bit application, it may not work with UNC paths. In this case, you have to either map a drive letter to the share or connect a port to a network printer.
You also use the Command Prompt to access the browse list or assign network resources. The NET VIEW command, for example, accesses the current browse list, as shown in Figure 2.20.
Figure 2.20 Using the NET VIEW command.
The NET USE command and the UNC path of the resource assign network resources to drive letters. To connect a drive letter to a share on a server, the command format is:
NET USE <drive_letter>:\\SERVER\SHARE
The NET USE command can also connect clients to network printers. To connect a port to a network printer on a server, the command format is:
NET USE <port>:\\SERVER\PINTER
To disconnect the network resources from a drive letter or port, use the /d switch:
NET USE <drive_letter>: /d
Working with NetWare Shares
Windows 2000 Professional can run Novell NetWare connectivity services and access NetWare networks easily, although you must install some additional software.
If your computer has NWLink IPX/SPX/NetBIOS Compatible Transport (NWLink for short) installed, it can establish client/server connections. If you want to access files or printers on a NetWare server, you also have to install the Microsoft Client Services for NetWare (CSNW) service.
NOTE
CSNW allows Windows 2000 Professional to access files and printers on NetWare servers running NetWare 2.15 or later. CSNW installs an additional network redirector.
When you install NWLink, your computer obtains the following ben_efits:
It gets a new network redirector compatible with the NetWare Core Protocol (NCP). NCP is the standard Novell protocol for file and print sharing.
It gets the ability to use long file names, if the NetWare server is so configured.
It gets Large Internet Protocol (LIP) to automatically negotiate and determine the largest possible frame size to communicate with NetWare servers.
NWLink and CSNW allow the workstation to access files and printers on a NetWare server running NetWare Directory Services (NDS). However, it does not support administration of NDS trees.
Windows 2000 Professional can access files and printers on a NetWare server without CSNW by connecting through a Windows NT Server or Windows 2000 Server configured with Gateway Services for NetWare (GSNW).
Once NWLink and CSNW are installed, you can access your network's NetWare servers without any special procedures.
Browsing. You can browse the NetWare or Compatible Network when you double-click on Entire Network in the My Network Places.
Map. Right-click on My Network Places and select Map Network Drive from the Shortcut menu to reassign any drive letter to any shared directory on a NetWare server.
Command Prompt. Use the UNC to locate NetWare resources with commands in the following format:
NET USE drive_letter: \\UNC_name\NetWare_name
Working with FTP shares
Windows 2000 Professional can access Transmission Control Protocol/Internet Protocol (TCP/IP)-based File Transfer Protocol (FTP) shares through My Network Places, the Add Network Place Wizard, Internet Explorer, or its built-in command line utility, as shown in Figure 2.21.
Figure 2.21 Commands for the built-in FTP utility.
Windows 2000 Professional can share files and folders if you install the Internet Information Service (IIS), as described in the next section.
Working with Web Server Resources
To share files and folders on the Web, you must install Windows 2000 Professional's IIS 5.0, giving it the ability to act as both an FTP and HyperText Transfer Protocol (HTTP) server. To do so, select the Install Add-on Components link in the installation CD-ROM's Autorun screen to open the Windows Components Wizard, as shown in Figure 2.22.
Figure 2.22 Installing IIS 5.0.
Enable the IIS checkbox and click the Next button to proceed. With IIS installed, a Web Sharing tab appears in the dialog box (see Figure 2.23).
Figure 2.23 IIS-enabled folder properties.
Enable the Share this folder radio button to open the Edit Alias dialog box, as shown in Figure 2.24.
Figure 2.24 Creating an Internet alias.
An alias might be needed to make your share's name legal for access of the Web. To be valid on the Internet, folder names must not contain spaces of the following characters:
!#$%&'*+-/=?{}|^´~.
To be accessible from a Web browser, for example, "Tom's Share" would need to become something like "tom."
In most cases, you may keep the default Access permissions of Read only. Enable Write access only if you wish to permit Web users to upload Web pages to your machine. Likewise, do not enable Script source access unless you wish to allow users to modify scripting that is established in your Web folder. Enable Directory browsing to permit users to see the files in the Web folder and choose among them (rather than being restricted to an "index" page).
Enable Applications permissions if your Web folder's Web pages use scripting or are designed as Active Server pages (ASPs).
To access your shared folder, users may enter a Universal Resource Locator (URL) through a the Add Network Place Wizard or Internet Explorer in the following format:
http://server_name/alias_name
Figure 2.25 shows such a folder with Directory browsing enabled.
Figure 2.25 Viewing contents of a shared Web folder.
Managing Web Server Resources
Once installed, you can manage your Web server resources using the IIS snap-in to the MMC, as shown in Figure 2.26.
Figure 2.26 Managing IIS shares.
With the IIS snap-in, you can perform the following tasks:
Find and list all Peer Web Services (Windows NT Workstation 4.0) and IIS (Windows NT Server, Windows 2000) servers on the ne_twork.
Connect to servers and view their installed services.
Start, stop, or pause any service.
Configure service properties.
You can learn how to set-up your IIS server through Internet Explorer by entering the following URL:
http://localhost/
This brings up the Web page shown in Figure 2.27 (if IIS has been enabled as described above).
Figure 2.27 Setting up IIS through Internet Explorer.
IIS 5.0 can also be managed locally or remotely through the Command Prompt using a command in the following format:
iisreset server_name
Some important switches that can be added to this command include the following:
/RESTART Stops and restarts all Internet services.
/START Starts all Internet services.
/REBOOT Reboot the computer.
/REBOOTONERROR Reboots the computer when errors occur starting, restarting, or stopping Internet services.
/NOFORCE Do not forcefully terminate Internet services if attempting to stop gracefully fails.
/TIMEOUT:<seconds> Specify the number of seconds to wait for a successful stop of Internet services. Upon expiration, the computer may be rebooted if used in conjunction with the /REBOOTONERROR parameter. Default values are 20 seconds for restart, 60 seconds for stop, and 0 seconds for reboot.
/STATUS Provides status of all Internet services.
/DISABLE Prevents restarting of Internet services on the local system.
/ENABLE Permits restarting of Internet services on the local system.
Troubleshooting Web Server Resources
Most problems associated with Web resource access are associated the use of erroneous URLS and misconfigured TCP/IP. If remote users fail to access your shared folders, verify the following:
Remote users have TCP/IP properly configured. One quick way to tell is if they can access resources other than yours.
You computer has TCP/IP properly configured. Make sure you can access Web resources with Internet Explorer.
IIS is running properly. Type the URL "http://localhost/" to bring up your index page (see Figure 2.27).
More complicated problems can be detected by viewing the Event Viewer logs in the MMC, as shown in Figure 2.28.
Figure 2.28 Viewing IIS errors in Event Viewer.
Study Break
Create a Shared Folder
Practice what you have learned by creating a shared folder.
Create a folder at the root level of the hard drive under a name such as "share." Next, enable sharing for the folder, giving it a different share name, such as "My Share," and adding a comment. Click the Permissions button to establish access rights, and the Caching button to set offline behavior. Use the MMC to review your configuration. Attempt to locate, connect with, and transfer a file into your shared folder from a remote computer.