Display warning when option doesn't have any effect?

Laurent laurent at cozic.net
Tue Sep 6 15:09:52 UTC 2016


In some cases, when rsync cannot apply an option, it is going to silently
ignore it. This happens for example with -g when the user is not part of
the file group and is not root.

I had this problem recently when I used rsync to backup a directory on a
server. I later restored the dir but of course I didn't notice that groups
hadn't been backed up, which in turns broke the server.

I had a similar issue with --chmod, which must be used with --perms or else
it's also silently ignored, and there are probably other cases.

I think it would be more user-friendly to display a warning when options
are going to be ignored. Something like this:

    rsync: group ownership cannot be set on path/to/file due to a lack of
permissions

    rsync: --chmod option is going to be ignored since --perms is not
enabled

So I'm wondering, would there be any interest in this feature? If I write a
patch for it, is it likely to be accepted?

- Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20160906/37fc9cac/attachment.html>


More information about the rsync mailing list