Scripts Thread, Home Drive Permissions in Coding and Web Development; Hi All,
My server that host my homes drives stuffered some serious problems last night meaning I had to take ...
30th October 2013, 02:41 PM #1
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 )
IDG Tech News
30th October 2013, 02:51 PM #2
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
30th October 2013, 02:55 PM #3
Thanks where can I download Cacls from?
Also what permissions will this assign? Could I add Domain Admins etc??
30th October 2013, 03:01 PM #4
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.
30th October 2013, 06:07 PM #5
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.
By ihaveaproblem in forum Windows Server 2008 R2
Last Post: 21st July 2012, 12:09 AM
By reggiep in forum Windows Server 2008
Last Post: 5th May 2011, 04:01 PM
By tarquel in forum Wireless Networks
Last Post: 16th July 2008, 10:58 AM
By secman in forum Windows
Last Post: 31st August 2006, 09:23 PM
By tosca925 in forum Windows
Last Post: 1st October 2005, 03:55 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)