Managing Folder Redirection
In a perfect world, users would only use their PCs to run applications. All their files would be placed on servers where they could be backed up, scanned for viruses, and stored on fault-tolerant devices rather than local IDE hard drives. This avoids conversations such as the following:
You have to do something quickly. My computer made a loud, grinding noise and now when I turn it on, I get a message saying Unable to load command interpreter. System halted.
We'll have someone up there in an hour to replace your hard drive.
What about payroll?
I'll bite. What about payroll?
Today is Thursday. I need my spreadsheets so that I can calculate payroll.
What server are they on?
I'm not sure. I think it's the C Drive server.
Trying to corral user data onto servers and other network-based storage is a never-ending chore. Users tend to save their files in convenient places, which usually means accepting whatever default location is offered by an application.
Many organizations use home directories to store user data. Unfortunately, very few applications default to a user's home directory. Starting with Windows 2000, Microsoft changed the logo standards so that applications are required to offer the My Documents folder as the default location for user files. Application developers either look for the %userprofile% variable, which points at the My Documents folder, or they make calls using the SHGetFolderPath function, which returns location information for all profile folders.
The default location of the My Documents folder is the local hard drive, but you can point it at a share point on a server either by manually entering a UNC path in the My Documents properties or by using a Folder Redirection group policy. In a purely Windows Server 2003, Windows XP, or Windows 2000 environment, folder redirection eliminates the need for classic home directories. If you need to support home directories for downlevel clients, or you prefer them to using group policies.
Folder Redirection Policies
The group policies that control folder redirection are located under User Configuration | Windows Settings | Folder Redirection. Here are the folders that can be redirected:
Contains user files, pictures, and sound clips.
Contains user configuration files, Public Key Infrastructure files, and user-specific data used by applications.
Contains the files and shortcuts displayed on the user's desktop in Explorer.
Contains the files and shortcuts displayed on the Start menu.
When you enable a folder redirection policy, the files are transparently transferred to the target server. Users may not even realize their files are no longer on their local drives—that is, of course, until the network goes down or the server hosting the redirected folders crashes. Also, traveling users may notice slowness in opening and saving their files when they are in a remote office reaching out across the WAN to the server hosting their redirected folders.
You can mitigate these and other network issues by using Distributed File System (Dfs) to replicate the content of user folders to strategically placed servers around your organization. See Chapter 16, "Managing Shared Resources," for more information about Dfs.
Laptop users will also notice that their files are not stored locally when they leave the office and go on the road. See section, "Managing Offline Files," later in this chapter for ways to cache copies of their files locally.
Controlling Placement of Redirected Folders
When you enable a folder redirection policy in the Group Policy Editor, you are given two sets of options for placing the redirected folders: Basic and Advanced.
The Basic option specifies a single location for the folders for all users affected by the redirection policy. The files are separated underneath the share point based on usernames. There are four ways you can identify the folder location:
Create a folder for each user under the root path.
Redirect the folder to a specified location.
Redirect the folder to the user's home directory.
Redirect the folder to the user's local profile.
In addition, you can specify in the policy whether to copy existing files from the users' local folders to the server, what kind of access permissions to assign to the files on the server, and what to do if the policy is removed or the user moves outside the scope of the policy. Here are details about how these options function in production.
Create a Folder for Each User Under the Root Path
This is a new feature in Windows Server 2003 and is the preferred method for redirecting the My Documents folder. When you select this option, you enter a UNC path to the share point. The system automatically appends path with a <username> folder followed by a folder named My Documents. The Properties window displays an example of the path that will be assigned.
The user's redirected folders are created automatically at the server when the user logs on the first time after you enable the folder redirection policy. The permissions applied to the folder depend on the setting of the Grant The User Exclusive Rights to My Documents option, accessed via the Settings tab in the policy Properties window (see Figure 19.2).
Figure 19.2. Folder Redirection Properties window showing the Settings tab.
If you select the Grant The User Exclusive Rights to My Documents option, a folder called My Documents is created and the user is given ownership. The access control list (ACL) for the folder includes only the user account and the System account, both of which have Full Control access permissions for the folder and all subfolders and files. Use this option when you want to assure privacy to the users. (Of course, it is always possible for someone with administrator privileges to take ownership of the folder and change the ACL. You can audit for this action.)
If you deselect the Grant The User Exclusive Rights to My Documents option, a folder called <username>'s Documents is created and the user is given ownership. The ACL for this folder is much different than the ACL with Exclusive Rights enabled.
First of all, the user account is given Full Control access only to the folder itself. The Creator Owner account is given Full Control access to the folder and all subfolders and files. This essentially gives the user full control rights, but if you ever transfer ownership, the access permissions shift to the new owner.
In addition, the <username>'s Documents folder inherits permissions from the parent folder at the root of the share. It is important to limit NTFS permissions at the root folder. Otherwise, users will see each other's files, which generally causes a good deal of commotion.
Redirect to the Following Location
This option works similarly to Windows 2000 Basic redirection. Specify a UNC path to the shared folder and then add the %username% environment variable followed by My Documents. For example:
This option has the advantage of backward compatibility. Use it if you have a mix of Windows Server 2003/XP and Windows 2000 machines.
This is the preferred option for Start Menu and Desktop folder redirection policies. If you point all the users at the same folder, you can maintain a uniform environment without imposing all the restrictions of a mandatory profile.
Any shortcuts you put in a redirected Start Menu appear "above the line" in the user's menu. They do not change the look, feel, or content of the new-format Start Menu. User permissions on the redirected folders are limited to Read and Execute.
Another use for the Specify a Location option is to point the My Documents folder at a different local drive. For example, some organizations just cannot convince their users to store files on a server. If the desktop team partitions the local drive into a "system" and "data" partition, you can use this option to redirect the My Documents folder to the data partition. Be sure to target this option only to users who have two partitions. You can do this with a Windows Management Instrumentation (WMI) filter that checks for the existence of a fixed disk with correct logical drive letter.
Redirect to the User's Home Folder
This is also a new option in Windows Server 2003. It comes in handy if you have a classic home directory infrastructure that you want to leverage.
If you select this option, the Exclusive Rights setting is ignored and the folders inherit their permissions from the root of the home directory. This ACL includes the Administrators group, by default.
This option is only available to Windows Server 2003 and XP clients. In a mixed domain, use the Specify a Location option with a UNC path to the share hosting the user home directories.
Redirect to the Local Userprofile Location
This is the equivalent of calling olly olly oxen free to the user's folders. Set this option to put the redirected folders back in their normal location in the users' local profiles. Leave this option in place long enough for all the desktops and laptops to get the setting then disable the policy entirely.
You can avoid this intermediate step by selecting the Redirect the Folder Back to the Local Userprofile when the Policy is Removed option when creating the policy. This option has the added benefit of automatically putting the user's data back on the local drive when the user object is moved out of the scope of the group policy. This happens when the user object is moved to another OU.
Specifying Folder Redirection Targets by Group
If you want to redirect folders based on group membership, select the Advanced option in the policy properties and identify the group name. After you select a group, you have the same location options as the Basic configuration. Figure 19.3 shows an example.
Figure 19.3. Advanced folder redirection properties showing group-based redirection.
Folder Redirection Highlights
If you plan on implementing folder redirection, here are a few additional caveats to keep in mind:
Avoid redirecting the Application Data folder if you use the Encrypting File System. This folder contains the user's PKI keys. If you redirect it to a server, laptop clients will not be able to encrypt or decrypt files when disconnected from the network. You cannot save Application Data in offline files.
If you host remote desktop users on a server running Application-mode Terminal Services, it's a good idea to enable a folder redirection policy for My Documents. This keeps the user data off your terminal server. You can also use Desktop and Start Menu redirection to provide a consistent look and feel to desktops in terminal service sessions.
If users want to encrypt files in their redirected My Documents folder, the server hosting the folders must be trusted for delegation. This makes the server highly privileged. See Chapter 17, "Managing File Encryption," for more information and precautions when encrypting files on servers.