Robocopy: Missing owner information

sidp232 1 Reputation point
2021-03-03T16:42:51.713+00:00

Hello,

I'm migrating our network shares (about 10 TB) from an old Synology NAS to a new Windows Server 2019 VM.

Anything except owner information works well with robocopy.

robocopy.exe $SOURCE $DESTINATION /MIR /COPY:DATOU /DCOPY:DAT /V /FFT /MT /NP /R:3 /W:15 /LOG:$LOG

I dont want to copy the NTFS access control list but the owner is important to us. After successfully copying all files the owner attribute always shows "Everyone" on every file.

All Windows Updates are installed and the Robocopy version is 10.0.17763.1490. I also tested it without any success on older Windows Server 2008 R2 and 2012 servers.

Any advices?

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,537 questions
Windows Server Storage
Windows Server Storage
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Storage: The hardware and software system used to retain data for subsequent retrieval.
640 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,427 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 49,686 Reputation points
    2021-03-03T17:00:50.543+00:00

    The owner information is in the ACL AFAIK because it is a permission assigned to the ACE that owns it. So if you don't copy the ACL then you don't get the owner information either. You'll need to make a decision.

    Option 1 - Copy the files without the ACLs. Then enumerate the files to set the owner on each one. If you put the files into a root folder then you should be able to set the owner on the root folder and have it inherited by all the children which would be quite a bit faster.

    Option 2 - copy the ACLs to get the owner information and then enumerate all the files to remove any explicit permissions. If you are putting all the files into a root folder then you can also, in theory, set the permissions on the root and tell it to reset the permissions on all children.

    0 comments No comments

  2. sidp232 1 Reputation point
    2021-03-04T08:24:22.29+00:00

    Thanks for your answer.

    Even if I try /copy:DATSOU or /copyall the owner information still is "Everyone".