RobD Posted October 30, 2013 Posted October 30, 2013 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?
FN-GM Posted October 30, 2013 Posted October 30, 2013 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 )
RobD Posted October 30, 2013 Author Posted October 30, 2013 Hi, Thanks where can I download Cacls from? Also what permissions will this assign? Could I add Domain Admins etc?? Thanks
FN-GM Posted October 30, 2013 Posted October 30, 2013 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.
RobD Posted October 30, 2013 Author Posted October 30, 2013 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now