How do I restore using --fake-super?
Graham Leggett
minfrin at sharp.fm
Mon Apr 21 09:58:12 UTC 2025
On 21 Apr 2025, at 06:37, TheNew HEROBRINE via rsync <rsync at lists.samba.org> wrote:
> For your situation I think you should use both --fake-super and -M--super because reading the manual it says:
> "For a local copy, this option affects both the source and the destination. If you wish a local copy to enable this option just for the destination files, specify -M--fake-super. If you wish a local copy to enable this option just for the source files, combine --fake-super with -M--super"
I was confused by the source code, the variable that keeps track of this is called "am_root", which implies that rsync has taken some action to determine whether or not it is running as root.
What the variable really means is "should_root", and the source of this variable are default operation and the settings --fake-super and --super.
The confusion I faced was that permissions stored in --fake-super were overwritten by the permissions used in the target directory, in the process the source permissions were lost.
I have submitted a patch to fix this here:
https://github.com/RsyncProject/rsync/pull/751
Regards,
Graham
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20250421/c537bdc9/attachment.htm>
More information about the rsync
mailing list