Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


January 2008

Problems with Permissions

Windows file server annoyances
RSS
Subscribe to Windows IT Pro | See More Security Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Shared Folder Delegation
There’s a Windows 2000 and Server 2003 annoyance—setting permissions for shared folders—that makes me want to read the riot act to the product team at Microsoft. This annoyance is so big and multifaceted that I can’t begin to do it justice here. (So if anyone at Microsoft is listening, call me!) At the core of the problem is the delegation of permissions to create shared folders.

Let’s assume you’re in an organization with more than one level of administrator. The organization has technical support people responsible for the servers. These folks work on hardware, backup, configuration, patching, and so forth—the tasks of real Administrators with a capital “A.” In Windows, a member of the Administrators group can do anything and get to anything on a server. Let’s say there’s also a support role with the task of creating a shared folder. To me and to every client I work with, this task is at a lower escalation level than the other tasks Administrators perform. Unfortunately, to Microsoft, these two types of tasks are equal. To create a share, you must be a member of a privileged group such as Administrators, Power Users, or Server Operators, and these groups have additional hard wired rights as well. Microsoft doesn’t provide a way to delegate the ability to create a shared folder to someone lower in the administrative hierarchy.

I was excited when I learned that Windows XP’s PowerToy, Tweak UI, exposed a way to delegate this ability. But, unfortunately, TweakUI isn’t an official part of Windows and Microsoft doesn’t support it. The permission to create a share is a binary registry entry, and changing it’s also not supported. So, I’m sad to say, the only way to delegate creation of shared folders is to put technical support groups into the local Server Operators or Power Users group on a member server. At least you can avoid giving them Administrators credentials.

But the fun doesn’t end there. When you create a shared folder, you want to configure its settings: permissions, caching, access-based-enumeration and perhaps its description or connection limit. The settings for the first three are the most useful and common. How do you configure them other than using the shared folder user interfaces? How can you use a command line or script? Permissions can be set from the UI or a command line (i.e., by specifying NET SHARE), but not through a VBScript. Caching settings can be set from the UI or the NET SHARE command, but not through a VBScript. Access-Based Enumeration can be enabled only in the UI. There’s no command line, and the NetShareSetInfo function isn’t something mere mortals can script. How’s that for consistency? It sure makes automating the creation of shares difficult for non-developers.

Finally, the default settings for a new shared folder are lousy for the vast majority of shared folders. Everyone::Allow::Read is the default share permission that restricts everyone, even administrators, from any higher-level access, even if NTFS permissions define more permissive access policies. Every client I’ve worked with recently has very clear policies indicating that Full Control is the correct share permission in almost every scenario and that NTFS permissions define actual access policy. This is an example of Microsoft locking down something too far and not giving customers a way to change the default to something useable.

Similarly, the default caching settings enable users to “pin” any file in the share to make it available for offline access. With any multi-user folder other than a read-only folder, this ability opens up possibilities for offline editing and conflicts on synchronization. Because of the security implications I recommend that you consider locking down the default access for offline files.

To change the default caching settings use a script or the command line to provision and automate your shares. The NET SHARE command, for example, provides an easy way to create a shared folder, including switches for configuring the Full Control share permission and for disabling offline files for the share:

/GRANT:Everyone,Full

and

/CACHING:None

File Sharing for Dummies
Everything I just discussed applies in Vista and Server 2008. Alas, Server 2008 continues down the wrong path. So consider this section a preview of Server 2008 annoyances.

My first Server 2008 annoyance is the Share command: Don’t even think of choosing the Share command on the context menu in Windows Explorer. The new Share command is reduced to “File Sharing for Dummies.” It displays the File Sharing dialog box shown in Figure 1, page 38.

In the File Sharing dialog box, you can change the Permission Level to Reader, Contributor, or Co-Owner. This dialog box sets both the share and the NTFS permissions to Read, Change/Modify, or Full Control. That implementation of permissions goes against the written policy and procedure of just about every client I’ve ever had. Typically policies require that shared folder permissions be Full Control and that NTFS permissions define access policy. And, because most of us learned to secure a folder before sharing it, we may have actually spent some time creating the perfect ACL. But this command won’t share the folder for any group that has anything other than standard Read, Modify, or Full Control NTFS permissions templates. Try securing a folder so that a team has Write permission and then try sharing it. You’ll see that the group isn’t given any share permission.

This annoyance gets worse because of the way Microsoft implements the roles in the dialog box. In most role-based security models, including Microsoft’s own SharePoint and Exchange public folder models, a Contributor doesn’t Modify, an Editor does. The difference between the Contributor and Editor roles is that a Contributor can add something and can change his or her contribution. In contrast, an Editor can change a file from any contributor. Now whether you agree with those definitions of Editor and Contributor or not, the real point is that Microsoft is making assumptions about the understanding every client has regarding roles. It doesn’t provide any options for a company to change what the dialog box does.

Finally, Microsoft rubs salt in the wound by putting this tool that I call “File Sharing for Dummies” in the same place the tried-and-true (and effective) Share interface used to be. You now have to look for the Advanced Sharing command to get to the settings you really need. And here’s my question: Because you have to be in a privileged group (such as Administrators) to share a folder and because we’re dealing with a server OS, can’t we assume that Administrators know what they’re doing? Even the very nice Provision a Shared Folder Wizard in Server Manager has crazy defaults—such as Everyone::Allow::Read and Caching=Manual—that you can’t customize for the needs of your organization.

The best solution for these Server 2008 annoyances is using the Net Share command or other scripts to provision shared folders with exactly the settings you require. Even the brilliant new PowerShell has no way to set all the Server Message Block (SMB) settings of a shared folder. Annoying.

Final Annoyance
The list of file server annoyances and solutions is far too long to detail in just one article. So watch this space for future articles. For further resources, see the Learning Path on page 36.

End of Article

   Previous  1  [2]  Next  


Reader Comments
Cool

dmolnar1 March 03, 2008 (Article Rating: )


The article is interesting but I still can not set permissions on a Windows 2003 Server that we had set on a Windows NT Server.

We are trying to allow authenticated users permissions to create folders, sub-folders and files on a shared folder. However, we want to restrict them to only delete the files and not the folders themselves. I've tried playing with the tips mentioned here, but as far as I've gotten is to prevent the user from deleting the folder they created, but not the sub-folders under it.

Other shared folders on the server need read and execute only permissions for the file, but not delete.

dlhendel March 31, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Escape From Yesterworld

Kevin points you to the funniest SQL Server website ever! ...


Security Whitepapers The Impact of Messaging and Web Threats

Why SaaS is the Right Solution for Log Management

Protecting (You and) Your Data with Exchange Server 2007

Related Events SQL Server 2008 – Can You Wait? | Philadelphia

SQL Server 2008 – Can You Wait? | Atlanta

SQL Server 2008 – Can You Wait? | Chicago

Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing