linkazoid Posted September 25, 2013 Posted September 25, 2013 (edited) Hi, I've just re-enabled Quotas on my Server 2012 and noticed that loads of home areas were using 0%. This means that when the data was robocopied across the files and folders have lost ownership permissions. Our Home folders are structured as following: I:\UserHomes\Borough_-_School Name\Staff\Username \Student\Year 7\Username \Year 8\Username \Year 9\Username \Year 10\Username \Year 11\Username \Year 12\Username Domain Administrator has ownership of all the top level folders. Is there a feature in Server 2012 that will set ownership of the folder to what the folder is named? Or alternatively does anyone have any scripts that will do this. Thanks, Michael Edited September 25, 2013 by linkazoid
3s-gtech Posted September 25, 2013 Posted September 25, 2013 The little utility chown.exe will do this for you, with this batch script: for /D %%i in (*) do ( chown -r %%i "%%i\*.*" ) Place chown.exe and the batch file in each root directory, and run it - it sets ownership to the folder name. It's ace, we run it every year when new users are created as the utility we use does not set ownership automatically. 2
linkazoid Posted September 25, 2013 Author Posted September 25, 2013 Thanks!!! You have saved me hours of work! I've resolved it all in 30 mins with your script and clear instructions above.
CHR1S Posted September 26, 2013 Posted September 26, 2013 I have this running but it seems to change nothing. What am I missing?
linkazoid Posted September 26, 2013 Author Posted September 26, 2013 Do you have chown.exe from CHOWN Free Download in the same folder? 1
CHR1S Posted September 26, 2013 Posted September 26, 2013 (edited) I have a GNU version, I will try that one instead Edit - that version seems to be better. Lots of access denied messages now. hmmm Edit 2 - Ran it in elevated powershell instead of elevated cmd and it worked great. Thanks Edited September 26, 2013 by CHR1S
3s-gtech Posted September 26, 2013 Posted September 26, 2013 Make sure that the user you're running the program as has Full Control on the root folder and all sub folders to make sure it runs correctly.
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