nugentgl
asked on
Robocopy Not Copying File Level Permissions...HELP
I have been using Robocopy for years and recently upgraded to the latest one from the 2k3 res kit. Anyway, I noticed a very strange problem. When I use the following command:
source destination /copyall /s /v /r:1 /w:1 /eta /mir /log:log.log
It will copy all the NTFS permissions for all the folders in the tree but none of the files. Is my command line incorrect?
source destination /copyall /s /v /r:1 /w:1 /eta /mir /log:log.log
It will copy all the NTFS permissions for all the folders in the tree but none of the files. Is my command line incorrect?
I always include the switch /sec to make sure I am copying NTFS security have you tried that?
ASKER
Thanks for the quick reply, but according to the documentation /copyall includes /sec.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
BINGO!
The files were already there. Is there a way to force the replacement of permissions?
I am in a very typical domain with a top level folder and subfolders below it. And the files are both in the root directory and subdirectories. Basically all files are not updated with the correct NTFS permissions, whereas, all the folders are.
The files were already there. Is there a way to force the replacement of permissions?
I am in a very typical domain with a top level folder and subfolders below it. And the files are both in the root directory and subdirectories. Basically all files are not updated with the correct NTFS permissions, whereas, all the folders are.
Shift-3's suggestion to use /is is correct. The Robocopy documentation mentions this scenario specifically:
"To refresh security information for existing destination files and directories without copying file data, use the /IS switch together with the /COPY switch without the D flag. For example /IS /COPY:SOU would refresh all security information for all selected files, without copying any file data."
I would suggest running a batch script to run your first command and then run it again with /is /copy:sou to get both data and security.
"To refresh security information for existing destination files and directories without copying file data, use the /IS switch together with the /COPY switch without the D flag. For example /IS /COPY:SOU would refresh all security information for all selected files, without copying any file data."
I would suggest running a batch script to run your first command and then run it again with /is /copy:sou to get both data and security.
ASKER
That did the trick. Very annoying that if the file already exists you have to do a refresh after you mirror the files for the last time before going live with the new location.