rsync --chmod affects the source permissions as well as destination permissions
Graham Leggett
minfrin at sharp.fm
Wed Apr 16 15:10:56 UTC 2025
On 08 Apr 2025, at 12:54, Graham Leggett via rsync <rsync at lists.samba.org> wrote:
> Another thing I've found is that my backups have lost their permissions.
>
> I misunderstood the --chmod option, thinking that it specified the permissions at the destination. What actually happens is that it overrides the source permissions, and has a side effect of the destination permissions being the same as the source. It looks like it works, when metadata is lost.
>
> I now need to fix this.
>
> What option will set the permissions on the destination side, while not affecting the permissions being fed into --fake-super on the source side?
>
> The end goal is a simple backup of a source filesystem preserving all users, all groups, all permissions, and all attributes, while the destination is a filesystem of a normal non-root user account.
I have proposed a --chmod-dest option to achieve this.
The --chmod-dest option allows the destination permissions to be specified independently of the permissions backed up by --fake-super attributes.
This means the source permissions are maintained, while on the backup machine permissions can be granted to allow specific users/groups to have read access to the backups.
https://github.com/RsyncProject/rsync/pull/751
Regards,
Graham
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20250416/b3fe15fa/attachment.htm>
More information about the rsync
mailing list