Welcome to TechNet Blogs Sign in | Join | Help

Ben Parker's Blog

Unnecessarily Awesome
The security Permissions aren’t the same when I use Robocopy /copyall or robocopy /Sec.

I see this when using Robocopy.exe version XP027 and trying to copy inherited permissions.  In the XP026 and earlier versions inherited permissions from the source would be copied to the destination.  This is no longer the case in XP027.

 

Why Does this Happen?

This is the result of a design change to prevent another bug.  It looks like there are no plans to change this at this time.

 

How to Workaround:

You can use the /MIR switch to get a similar behavior and in my tests it did work with the inherited permissions but realize that this will delete anything on the destination that isn’t on the source.  There is also some odd behavior with this switch.  I’ve seen a few references to this blog here that spells it out

How to Repro:

Make 2 directories

Md a

Md b

On c:\a add a textfile

On c:\b uncheck “Include inheritance permissions from this object’s parent” and remove the inherited permissions and grant yourself full control

Use robocopy.exe XP027

Robocopy.exe c:\a c:\b /copyall

View the permissions on c:\b they will remain unchanged

Delete the textfile from c:\b

Use robocopy.exe XP026

View the security settings on c:\a and c:\b and they will match

 

Posted: Wednesday, July 01, 2009 9:43 PM by BenParker
Filed under: , ,

Comments

No Comments

Anonymous comments are disabled
Page view tracker