One client has a Windows Domain with Home Folders, directed to a share using a GPO (\server\share\%username%).
The share has all users full control and the sub folders need permissions only for the relevant user to have full control recursively in each folder and not in any other subfolder.
For Example: John needs only access to \server\share\john recursively and should not be able to browse and access to \server\share\peter.
I have looked at Icacls and set-acl.
The folder name is the same as the login name (Peter logs in with username peter and John with username john)
Any pointers?
Best Answer
I have a vb.net class I wrote that you can use:
To use it:
The code:
If you want the code to get the directories for you: