Solved

Windows 2008 R2 Share Permission

Posted on 2011-02-23
17
1,164 Views
Last Modified: 2012-05-11
I have question regarding how to setup share security. Not sure if this is possible, but I need to setup a share folder. Restrict all first level folders ready only, then all sub folders read/write

For example: the share name is Test

In Test I have thousands folders - client1, client2, etc... --> I like this level to be assign read only to domain users

In "client1, client2, etc... " sub folders and files --> I like to allow users pretty much full access rights (read/delete/modified)

I know I can manually go to each client folders and manually change security access, but obviously not possible due to the folders volume.

Thanks in advanced.
0
Comment
Question by:ntran80
  • 7
  • 7
  • 3
17 Comments
 
LVL 1

Expert Comment

by:Medfly
Comment Utility
The way I would do that would be to allow Everyone or Authenticate Users full control on the share (Share Permissions) but restrict the folder permissions using NTFS permissions.

If you put Read only on the Share, then that will be the highest level of permissions anyone will get on any subfolder in the share.

Share vs NTFS permissions (most restrictive wins).
0
 
LVL 12

Expert Comment

by:Navdeep
Comment Utility
Yes, you can break the inheritance at Top Level folder and let the inheritance flow from 2nd level folder below.

you can use powershell
get-acl and set-acl command to copy similar acl across multiple folders. However you need to use reference folder whose permissions you want to copy

issue this on powershell console to get examples
get-help get-acl -examples
0
 

Author Comment

by:ntran80
Comment Utility
V-2NAS - I am not too familar with powershell so I will attempt to set access using Medfly's sugestion.

Medfly: I am confuse. If I set "Read only" at the share level, what do I set in the "Security" tab? (I assume this is what you meant "NTFS"
0
 
LVL 12

Expert Comment

by:Navdeep
Comment Utility
Hi,

powershell will able to help you perform bulk task in one shot

Let say you have FolderA > FolderB > FolderC
On Folder A u want read access

Share the folder and from security tab give users/group only Read access
Go to Folder B> Security > Advance > uncheck inherit and do copy permission (will get a warning msg)
now add user/group who wants read + write access

if you try to do it with few test folder you will be able to understand this.

0
 
LVL 1

Expert Comment

by:Medfly
Comment Utility
If you set 'Read Only' on the share, then that's all anyone will be able to do. Just read the files, they won't be able to modify or add files or folders.
Instead.. set the Share permission to Full Control for Everyone, then go to the Security Tab and set the individual or Group permissions you would like to enforce.  

Based on your initial post, you don't  want users to be able to add or delete from the Root of the share... in this case... your TEST folder.  But you don't mind if they add sub folders or files to any of the client1, client2, etc... folders.

This is easy to do with the security tab..

Open the security tab of the TEST folder,
Ensure you have Administrators Full Control in there.
Click Edit and then Add the 'Authenticate Users' group and give them Modify Rights.
After you click OK and Apply you should be back at the Main Security Tab...
Now Select the Advanced button.
Then Edit.
Highlight the Authenticated users you just added and select Edit again.
You should see an option for APPLY TO:  
Change it to Subfolder and Files only .
That should lock it down the way you described.

0
 

Author Comment

by:ntran80
Comment Utility
Medfly, we are almost there, but I think I missed "spoke"
In the share folder Test, I have thousands folders i.e.. Client1, Client2, Client3...
What I like to happen is "Read only" at Client1, client2, client3... folder level.
There are sub folders and files in each of the client1, client2, client3.. that I want domain users to be able to have full control.

I tried play around with security settings, but somehow can't locked down the clientxxx level.

Thanks again.
0
 
LVL 1

Expert Comment

by:Medfly
Comment Utility
Try this then...
Share permissions = Everyone - Full Control
Security TAB of the TEST folder:
Uncheck inheritance - it will ask you to Copy or Remove inherited permissions: Select COPY.
That will leave existing permissions in place.  
Then select any User or Group - such as 'Users' 'Creator Owner' and remove them.
Only thing left ...
Administratrators - Full Control - This folder, Subfolders and files
System - Full Control - This folder, Subfolders and files
Authenticated users - Read/Execute - This folder, Subfolders and files

This will allow everyone to access the share, traverse the folders and read / execute content.  But will not allow any changes to any folder or files... except for those in the Administrators group.
To grant greater acces to only the subfolders and files you will need to adjust permissions on each Client_X folder so that Authenticated Users can Modify content within each folder.  Since you have thousands of Client folders, you will need to use a tool such as ICACLS or XCACLS to automate this task.

http://support.microsoft.com/kb/919240
http://support.microsoft.com/kb/825751

From the server hosting the share:
run this from the command prompt (F:\test\*) should be the the drive and folder name you are using.

icacls f:\test\* /grant "Authenticated Users":(OI)(CI)M

This  will Grant the ability for Auhenticated Users to modify content of all your Client_X folders bt leave the restrictions set first ..in place. I believe this should give you what you are looking for.
If you still feel Full Control is necessay, then just change the M to an F in the command line above.
0
 
LVL 12

Expert Comment

by:Navdeep
Comment Utility
Hi,

Do this Properties of Client1, security , advance, remove inheritance first.
Warning message will come, copy the permission, click ok
now go to security, remove the users/groups, now only add those user/groups you want to have read permission, you can use deny permission on set of user/groups but be very careful doing so, deny permission will take precedence over allow

now you need to brk inheritance on subfolder/files do the same think as above, give desired write permissions.

You are done.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Expert Comment

by:Medfly
Comment Utility
Sorry ...
this is the correct command:

icacls f:\test\* /grant "Authenticated Users":(OI)(CI)(IO)M

This one only applies the permissions to the child objects of the Client_X folders... the first one pinned them to the Client folders and would allow users to delete a Client_X folder.  (I am assuming that all subfolders and files are inheriting permissions from the parent.  This is why I've recommended the course of action described.  It minimizes the number of permission changes that need to be made while still leveraging the existing inheritance.

I would refrain from using explicit DENY permissions if at all possible.  It will save you some headaches down the road.

Let us know how it goes.
0
 

Author Comment

by:ntran80
Comment Utility
Medfly, thank you for all your time walking me thru these process. I will give it a try tonight.

I was thinking about another option. Is it possible to allow domain users to make changes (add/edit/modify) to client1,client2, client3... and its sub folders/files but NO DELETE at any level?
0
 
LVL 1

Accepted Solution

by:
Medfly earned 500 total points
Comment Utility
Sure..
Easiest way would be to use this command 'after' you are happy with results of previous recommendations:

icacls f:\test\* /Deny "Domain Users":(OI)(CI)(IO)D

(this contradicts my previous comment about using Explicit Deny though)  However, it will give you the desired result.  Users can create new content, modify existing content. But will not be able to delete anything.  Only an Admin will be able to do that.  You may end up with a lot of trash that way and a bunch of cleanup down the road... (with thousands of folders and files).  But it will lock it down the way you requested.



0
 

Author Closing Comment

by:ntran80
Comment Utility
Thank You!!!
0
 
LVL 1

Expert Comment

by:Medfly
Comment Utility
My pleasre... Good luck!
0
 

Author Comment

by:ntran80
Comment Utility
Medfly, sorry - I spoke with my boss. He wants to keep everything simple. Here is what we like to get accomplish:

Share name: Test
All folders: client1,client2,client3 and sub folders/files ... -> give domain users create/read/write/modify but remove delete
(I know in order to be able to rename, they need delete access so there is no rename)

This is what I did and somehow it's not working:

Open the security tab of the TEST folder,
Ensure you have Administrators Full Control in there.
Click Edit and then Add the 'Authenticate Users' group and give them Modify Rights.
After you click OK and Apply you should be back at the Main Security Tab...
Now Select the Advanced button.
Then Edit.
Highlight the Authenticated users you just added and select Edit again.
You should see an option for APPLY TO:  
Change it to Subfolder and Files only .

I thought "most restriction wins" but the authencate users group is still able to delete.
0
 

Author Comment

by:ntran80
Comment Utility
Medfly, I went to Security tab and set deny to "delete" and that did it.

Thanks
0
 
LVL 1

Expert Comment

by:Medfly
Comment Utility
Most restrictive applies when there is a conflict between SHARE perissions and NTFS (Security Tab) permissions.  (That's why I recommended you set the Share permissions to Everyone Full Control and use the Security tab to define who can do what.)

In the case of conflicting NTFS permissons, they are cumulative. So in essense, least restrictive wins... unless you use and explicit DENY... like you did with Deny Delete... that takes precedence.

Cheers!
0
 

Author Comment

by:ntran80
Comment Utility
Yes. That seems to be the case.
Thanks.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now