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

 - 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!

  • 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

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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