question

sidp232 avatar image
0 Votes"
sidp232 asked XiaoweiHe-MSFT commented

Robocopy: Missing owner information

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-powershellwindows-server-2019windows-server-storage
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

I'd like to check if the reply could be of help, if yes, you may accept the reply as answer, if you have any other concerns or questions, please feel free to feedback.

Best Regards,
Anne

0 Votes 0 ·
sidp232 avatar image
0 Votes"
sidp232 answered XiaoweiHe-MSFT commented

Thanks for your answer.

Even if I try /copy:DAT*S*OU or /copyall the owner information still is "Everyone".

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I did some testing and took a look online and I can see years of posts about robocopy not properly handling owners. It appears that there are many factors as to why it doesn't work correctly. Some of the later posts go so far as to say that most versions of robocopy since 2003 are buggy and don't work properly with owner. In other cases there are discussions that using a UNC path works but local paths do not.

Robocopy definitely seems buggy to me. In my case trying to copy the owner information produces and access denied even though I have full permissions on everything. It also doesn't copy the files in this case.

1 Vote 1 ·

Thanks for your testing and research. I also read a lot of posts about all the bugs it has since years.
I will do a last test with both sides UNC paths. Do you know a good alternative to robocopy? I found a lot of alternative tools by searching but may you have a favorite tool you are already using and have good experience with it.

0 Votes 0 ·

Personally I would still use robocopy as I think it is the best but I'm generally not worried about owner copying.

Here's a link to a recent comparison of options. I've heard of a few people using rsync but haven't used it myself.

2 Votes 2 ·
Show more comments
cooldadtx avatar image
0 Votes"
cooldadtx answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.