Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a USERS folder and inside it i have one folder for each USER e.g.

USER
 - Adrian
 - Betty
 - Carlos

I want to:-

  • allow the domain\admin to have full control over all files and folder
  • allow individual domain[named_user] to have full control over the contents of their own folder BUT cannot delete or rename their named folder (or any other for that matter.)
  • no domain\user can access another's folder.

I have hundreds of such user folders and thousands more files. Currently, the permission is all messed up such that some user folders now allow domain\user while others don't. Some user folders have other domain[named_user] allowed for that folder.

Whenever I change a permission for a folder, it recurse into that folder and take a very long time. Is there a way to quickly remove all domain\user from all folders' permission? Thanks in advance!

share|improve this question

migrated from superuser.com Apr 18 '11 at 15:01

This question came from our site for computer enthusiasts and power users.

    
possible duplicate of Using ICACLS to set permissions on user directories –  Evan Anderson Apr 18 '11 at 18:45
1  
You don't want to assign permissions to user accounts except in the case of the "primary" user assigned to a "home folder". All other permission entries should always name groups. Always. –  Evan Anderson Apr 18 '11 at 18:46
    
@Evan Anderson I should have typed domain\Administrators instead. Thanks for the reminder though =) the folders are "home folders" but overtime various admins decided to add different users to different folders... bad. –  Jake Apr 19 '11 at 1:19

1 Answer 1

up vote 0 down vote accepted

I'd make use of icacls in this case. Here's small script that I used to do something similar: Using ICACLS to set permissions on user directories

You'll need to tweak it for your situation, but all the commands are there.

share|improve this answer
    
thanks! I will check that out. –  Jake Apr 19 '11 at 1:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.