Display warning when option doesn't have any effect?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Display warning when option doesn't have any effect?

Laurent
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

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html