Home Folder Ownership
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:
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.
The little utility chown.exe will do this for you, with this batch script:
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.
for /D %%i in (*) do (
chown -r %%i "%%i\*.*"
You have saved me hours of work!
I've resolved it all in 30 mins with your script and clear instructions above.
I have this running but it seems to change nothing. What am I missing?
Do you have chown.exe from CHOWN Free Download in the same folder?
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.
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.