Windows: Robocopy quits with access denied Error 5 even if you have modify permissions

Hi,

let us assume that you have write permissions (not full control) to a network share, you start robocopy without copying ACL and Attributes (/COPY:D, /DCOPY:D) and nevertheless robocopy exits with ACCESS DENIED. robocopy requests a lot of permissions:

Desired Access: Generic Read, Write Data/Add File, Write EA, Write Attributes, Delete, Write DAC
Disposition: OpenIf
Options: Directory, Synchronous IO Non-Alert, Open For Backup
Attributes: DA
ShareMode: None
AllocationSize: 0


robocopy tries to set directory info to which modify permissions are not sufficient.

A workaround is to set also /NODCOPY, this option is only available in newer versions of robocopy. This option tells robocopy to request a minimal set of permissions:

Desired Access: Synchronize
Disposition: Open
Options: Directory, Synchronous IO Non-Alert, Open For Backup
Attributes: n/a
ShareMode: None
AllocationSize: n/a
OpenResult: Opened

Michael

Leave a Reply