Unconditionally transfer files + file permission blues

Matt McCutchen matt at mattmccutchen.net
Sun Jun 19 09:22:21 MDT 2011

On Sun, 2011-06-19 at 11:06 +0200, Andre Majorel wrote:
> Turns out -I/--ignore-times does seem to force unconditional
> transfer. I thought it didn't because --checksum overrides it --
> even if it precedes it on the command line. That it did was not
> obvious to me from reading the man page.

This is the result of the two options setting separate variables with
the --checksum variable taking priority.  Feel free to file a bug.
There are probably more cases like this in which later options don't
override earlier ones properly.

> > What I don't understand is why people say they don't know why you'd
> > want to do that without knowing any of your context.
> The application is installing executables. -a is handy but if
> you ever forget --no-group --no-owner, they will be owned by
> whatever user wrote or compiled them.

Indeed, it is unfortunately common practice for people to use -a without
thinking about whether it is really what they want.  To try to avoid
future mistakes, you could define a popt alias for the combination you
want.  To fix a previous mistake, in 3.1 and in a maintained patch for
3.0.x there is a --chown option that you can use in combination with -a
to force the ownership on the destination without retransferring the

There is another lesson here, namely, that POSIX's non-inheriting
per-inode permissions are a disaster from a management point of view.
It's much better to specify permissions for broad classes of files in a
form that can be quickly verified to match the intent.  I wrote a patch
that allows permissions and ownership to be applied via include filters
(bug 6197) and am still using it in the build process for my personal
web site, but have not taken the time to clean it up for upstreaming.


More information about the rsync mailing list