Jump to content

Recommended Posts

Posted

Hi All,

 

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:

 

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  )

 

If so would I just need to naviagte to the folder in cmd and run the script?

Posted

Hi,

 

Thanks where can I download Cacls from?

 

Also what permissions will this assign? Could I add Domain Admins etc??

Thanks

Posted

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.

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...