I created a home directory for a user. He is the owner of his home directory and files/subdir in it. And he is the only one who is in the ACL, so even I login as Administrator, I still can't move or touch his directory unless I take ownership of his home dir, files and subdir. While changing the ownership and permission I have to click "Yes" as many as the number of files and dir inside his home directory.
Is there a script to simplify this work?
What is the best practise of creating user home directory so that we can move/copy it when neccessary(eg. lack of disk space)?
Maybe get administrator full control in the ACL from the begining?
I'm assuming you're using NT 4 server (as that's the forum it's created in). NT 4 home user folders simply inherit the permissions of the parent folder they're created in, so make sure Administrators have Full Control on the root of the homedir folder before creating them.
If you want to easily replace ownership on a whole bunch of files, use the following at a command prompt: subinacl /subdirectories c:\homedirpath\*.* /setowner=administrator (subinacl is avail. on the NT reskit) - this changes owenership of the files and folders. Then run: xcacls c:\homedirpath\*.* /G administrator:F /E - this gives administrator Full Control of the files and folders.