Home Drive Permissions
My server that host my homes drives stuffered some serious problems last night meaning I had to take ownership of all the home drives and copy them to a new server.
The problem I have is all the permissions seem to have broken, so the plan is to re-set all the permissions with something like subinacl etc.
Would the below work:
If so would I just need to naviagte to the folder in cmd and run the script?
for /D %%i in (*) do ( subinacl /file %%i /grant=yourdomain\%%i=C "/grant=yourdomain\domain admins=f" /grant=yourdomain\AreaViewer=c /setowner=yourdomain\%%i
subinacl /subdirectories %%i\* /grant=yourdomain\%%i=f "/grant=yourdomain\domain admins=f" /grant=yourdomain\AreaViewer=r /setowner=yourdomain\%%i )
In the past i have used this and its worked a treat
for /D %%i in (*) do (
cacls %%i /T /E /G DOMAIN\%%i:c
Thanks where can I download Cacls from?
Also what permissions will this assign? Could I add Domain Admins etc??
Erm i got mine from some site on google, shouldn't be hard to find.
This will do users only. Assuming your folders are named the same as the usernames. Just setup the other permissions normally and this will do the awkward bits.
Is there any chance you could send me the file? I'm struggling to get hold of it and the original code I posted results in:
1337 The security ID structure is invalid.