Stephen Gildea
2003-Jun-30 22:11 UTC
--link-dest non-optimal without --owner (or when not root)
If I run rsync 2.5.6 not as root, so that the -o (--owner) and -g (--group) flags don't work, then files that are not owned by me in the source directory will not be linked by --link-dest. When rsync looks in my link-dest, it sees a file owned by me. When it compares that with the source file not owned by me, then rsync thinks it cannot skip that file, and no hard link results. However, because I am not running rsync as root, the resulting new file is owned by me, same as the rejected link-dest file. The result is that I have two copies of the file, one in the link-dest directory and the other in the destination directory, that are identical, that should be linked, but that are not linked. Perhaps the "skip file" algorithm in rsync should compare the destination file with the user/group that the source file would become, not with what it is. < Stephen
jw schultz
2003-Jun-30 22:32 UTC
--link-dest non-optimal without --owner (or when not root)
On Mon, Jun 30, 2003 at 08:11:19AM -0400, Stephen Gildea wrote:> If I run rsync 2.5.6 not as root, so that the -o (--owner) and > -g (--group) flags don't work, then files that are not owned by me in > the source directory will not be linked by --link-dest. > > When rsync looks in my link-dest, it sees a file owned by me. When it > compares that with the source file not owned by me, then rsync thinks it > cannot skip that file, and no hard link results. However, because I am > not running rsync as root, the resulting new file is owned by me, same > as the rejected link-dest file. > > The result is that I have two copies of the file, one in the link-dest > directory and the other in the destination directory, that are > identical, that should be linked, but that are not linked. > > Perhaps the "skip file" algorithm in rsync should compare the > destination file with the user/group that the source file would become, > not with what it is.cvs -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
Stephen Gildea
2003-Jul-06 05:13 UTC
--link-dest non-optimal without --owner (or when not root)
> jw@pagasys.ws wrote: > cvsI 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. < Stephen