[Bug 12806] Deleting in a row of hardlinked snapshots resets file permissions.

Lars Ellenberg lars.ellenberg at linbit.com
Thu Jun 8 13:16:39 UTC 2017

On Thu, Jun 08, 2017 at 07:09:24AM +0000, just subscribed for rsync-qa from bugzilla via rsync wrote:
> https://bugzilla.samba.org/show_bug.cgi?id=12806
> --- Comment #4 from Heinz-Willi Wyes <hww at delember-wyes.de> ---
> I got a personal message from Lars Ellenberg that went also to
> samba-bugs at samba.org and rsync-qa at samba.org. He wrote:
> ------------------
> Calling chmod only on (optimization: non-empty) directories would fix this.
> I don't need to chmod a *file* before unlinking it, I just need write
> permission on the directory it is located in.
> (Now you have to convince the "appliance" to use a patched rsync ...)

Note that as long as you have only files (not directories) without write
permissions, you can potentially work around this using "--super" (or "--fake-super"),
because in that case rsync sets "am_root" to 2 (or -1),
"!am_root" becomes false in the various conditions,
and the do_chmod() will not even be called.

Not sure though what other implications --[fake-]super will have for your usecase.

	Lars Ellenberg

More information about the rsync mailing list