2

If as an administrator I remove all permissions from a folder - and set the owner to another user in Active Directory, I will not be able to copy that folder through explorer to another folder/drive or server etc.

How come robocopy can? For example - this command:

start robocopy "F:\NoPerm" "G:\Test" /MIR /COPYALL /ZB /W:1 /R:1 /LOG:F:\Test.txt /TEE

Where there are no permissions assigned for anyone on F:\NoPerm, but Robocopy can still read content and copy files and permissions to G:\Test

PnP
  • 1,684
  • 8
  • 37
  • 65

1 Answers1

3

The same way Windows Backup can. Any process that has the Backup Files and Directories Windows right can enable that right, which effectively bypasses file system permissions.

Greg Askew
  • 34,339
  • 3
  • 52
  • 81
  • So I assume on that basis, Robocopy has that right? – PnP Jul 27 '13 at 00:00
  • No, you have that right. However, it is an optional right that (for example) Explorer doesn't ask for when you open it. Robocopy does ask for it. If the user running Robocopy has the right, then Robocopy can use it. If not, then robocopy's request will fail. – longneck Jul 27 '13 at 00:22
  • No, the user account running Robocopy would have the right, which you can observe in Process Explorer as SeBackupPrivilege. I believe you can direct Robocopy to enable that right by toggling the Backup mode switch. – Greg Askew Jul 27 '13 at 00:23
  • 1
    FYI, I think it's the /ZB option that causes Robocopy to request the bypass permission. – longneck Jul 27 '13 at 00:23
  • correct @longneck - specifically the /B – TheCleaner Jul 27 '13 at 07:06