Folder Permissions En Masse
-
OK, i've got 60 folders. All are equivalent to a user name. Who knows the quickest way to give the person whose user name = the folder name full control of said folder? I'm assuming PS but i'm no PS pro.
-
Apply the creator owner permission to the folder their all in make this inherited to the folders below it but, not its own folder. Then change the owners of your folders to the user. I wouldn't use individual users in file permissions that just makes management harder.
-
Assuming NTFS permissions
https://technet.microsoft.com/en-us/library/hh750728.aspx
Just have to build a batch file to perform the change. Do a dir to get the list of the entire folder, build a spreadsheet with the names in it, and add to the beginning and end of the command
net share \<<share>> /grant:<<user>>,full
-
@PSX_Defector said:
net share \<<share>> /grant:<<user>>,full
That doesn't change NTFS permissions that creates a share with the specified share permissions. You really don't want to share these user folders out individually (though i've see people do it.) It's a nightmare. Make a Users folder and share that out (you can even use the $ at the end to make it hidden).
-
This is what I'd recommend going of what I said above add the Creator owner permission and give full control to it on your "Users" Folder, but set it to Subfolders and files only. Make sure you tick replace child object with inheritable permissions. Then apply it. Assuming you followed the standard convention of making the user folder the same as the username this will be easy to script changing the folder owner. Check out this script: http://www.steelbytes.net/set-owner-rights-on-user-profile-or-home-folders-script