2097 Posted August 5, 2010 Posted August 5, 2010 Hi Guys My documents are currently redirected back to C:\path\name\my documents i think ' grant exclusive rights to user ' is enabled . i have no problem setting permissions on the user name path but the My documents part wont allow me to touch it because i am not the owner . Is there a good automated way to do this using a VBS ? as i dont want to take owner ship of them all by hand. tried a few different ways so far but all they have done is changed the user name folders permissions.
rh91uk Posted August 5, 2010 Posted August 5, 2010 Yes, there is! An example.. for /D %%i in (*) do ( SetACL.exe -on "Z:\homedirs\%%i" -ot file -actn setowner -ownr "n:DOMAIN\%%i;s:n" SetACL.exe -on "Z:\homedirs\%%i" -ot file -actn rstchldrn -rst "dacl" ) Change "z:\homedirs" to the path to your my documents store on the server. Don't remove %%i as this is the folder name for each user (the username). Change DOMAIN\ to your domain Save it to a directory on your server and name it "Perms.bat" (for example) You need to run the script on the server, and have SetACL.exe in the same dir as the batch script. Download it from Download SetACL: Windows ACL management from SourceForge.net
plexer Posted August 5, 2010 Posted August 5, 2010 Just unselect gran texclusive rights in your gpo for the redirection? Ben
2097 Posted August 5, 2010 Author Posted August 5, 2010 Just unselect gran texclusive rights in your gpo for the redirection? Ben already have got 4 years worth of my documents lol ! But will remove the policy from now on
2097 Posted August 5, 2010 Author Posted August 5, 2010 Yes, there is! An example.. for /D %%i in (*) do ( SetACL.exe -on "Z:\homedirs\%%i" -ot file -actn setowner -ownr "n:DOMAIN\%%i;s:n" SetACL.exe -on "Z:\homedirs\%%i" -ot file -actn rstchldrn -rst "dacl" ) Change "z:\homedirs" to the path to your my documents store on the server. Don't remove %%i as this is the folder name for each user (the username). Change DOMAIN\ to your domain Save it to a directory on your server and name it "Perms.bat" (for example) You need to run the script on the server, and have SetACL.exe in the same dir as the batch script. Download it from Download SetACL: Windows ACL management from SourceForge.net Many thanks been looking for that !
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