--link-dest non-optimal without --owner (or when not root)

jw schultz jw at pegasys.ws
Sun Jul 6 10:59:16 EST 2003

On Sat, Jul 05, 2003 at 03:13:50PM -0400, Stephen Gildea wrote:
> >  jw at pagasys.ws wrote:
> >  cvs
> I see it now in CVS (post-2.5.6).  Thank you.
> However, this fix doesn't completely do what I want.  If I don't specify
> --owner, then it works.  However, if I specify -a (implying --owner) but
> am not root, then the linking still fails.
> Perhaps the preserve_uid variable in rsync should be forced off unless
> am_root is true.

By the same token archive mode should not set preserve_gid
unless you are a member of all groups.  Either that or
link_dest would need to test am_root || am_member(file->gid).
That is too ugly to consider adding to skip_file.

By the time you understand rsync well enough to be using
--link-dest you ought to have clear understanding of the
implications of --archive.  It is better to have option
misuse produce obvious, non-destructive effects than to have
it produce subtle and hard to identify ones.

	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt

More information about the rsync mailing list