Windows Thread, Moving Users home directories and keep the permissions in Technical; We are looking at moving pupils home directories to another set of hard drives on our Windows 2000 Server. I ...
Moving Users home directories and keep the permissions
We are looking at moving pupils home directories to another set of hard drives on our Windows 2000 Server. I know that if you just copy or move them to another place then the permissions get screwed.
Is there a way to copy all the user directories and keep all the permissions!
Re: Moving Users home directories and keep the permissions
using Xcopy on the command line...
Do an xcopy /? for all the options - there's loads of flags you can add, but the most important one in this case is /O (copies file ownership and ACL information)
Re: Moving Users home directories and keep the permissions
Originally Posted by Geoff
Robocopy is another alternative.
Or you could use NTBackup.
Robocopy is my favorite I have used it many times for such tasks. I also use it as part of my backups. Just make sure you set the file retry to a sensible limit
The only problem I've found with this is that it screws up Disk Quotas.
Quotas work on the Ownership of the file, but the Administrator will own all the moved files so Disk Quota will show them as using lots of space and the users using none, until they create new files which they will then own.
The only problem I've found with this is that it screws up Disk Quotas.
Quotas work on the Ownership of the file, but the Administrator will own all the moved files so Disk Quota will show them as using lots of space and the users using none, until they create new files which they will then own.
I have a script to sort that using the windows version of chown if you like
Re: Moving Users home directories and keep the permissions
This should be the one
Code:
rem sets permission on all files according to home directory name
for /D %%i in (*) do (
chown -r %%i "%%i\*.*"
)
pause
You run it at the same level as your home folders so if you have your year groups in seperate folders you need to run it in each. Of course do a test in a safe location first so you can get the hang of it. It doesnt take very long to run depending on how much data there is. There are also less hoops to jump through than using subinacl and tools like that. Its just simple and works
The official site seems to be filtered by my RBC for some reason so heres the program.
Oh and I forgot to add if you use RObocopy in the future it will preserve the file ownership.