This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Rsync link-dest not working for a host with the most recent rsync/cygwin 1.7


Chris Francy wrote:
> On Thu, 22 Oct 2009 20:08 PM, Steven Monai <smonaica@yahoo.ca> wrote:
>> Could you re-run your Cygwin-1.7 test case with --itemize-changes added
>> to the rsync command-line? That should provide a hint at what Debian's
>> rsync thinks is different between its existing file copy and Cygwin's
>> source file. Also, I would like to see what Cygwin's 'stat' command says
>> about the source file on the Windows box.
> 
> The output of stat of my testfile on the box with cygwin 1.7 is
> 
> stat testfile
>   File: `testfile'
>   Size: 1048576         Blocks: 1024       IO Block: 65536  regular file
> Device: bcdb6416h/3168494614d   Inode: 27303072741079683  Links: 1
> Access: (0700/-rwx------)  Uid: (4294967295/ UNKNOWN)   Gid: (  401/mkpasswd)
> Access: 2009-10-20 23:37:29.577294700 -0700
> Modify: 2009-10-21 00:36:28.000000000 -0700
> Change: 2009-10-20 23:37:30.030425500 -0700
> 
> Here (http://pastebin.com/m6c414439) is the output of my rerunning my
> tests against the server with cygwin 1.7 with the  --itemize-changes
> and -vv rsync options.

Notice that the Uid/Gid of 'testfile' on Cygwin 1.7 is a bit crazy. It
is likely that '/etc/passwd' and/or '/etc/group' have not been set up
correctly on that box. On the Debian side, it appears that rsync is
unable to preserve ownership when presented with that strange Uid,
instead saving the file with Uid/Gid = 0/0. (Presumably, rsync is
running as 'root' on the Debian box.) On subsequent runs, Debian's rsync
determines that the source file and its local copy are different,
because the source Uid (4294967295) is different from the local Uid (0).
Thus, when asked to preserve ownerships, rsync with the --link-dest
option effectively never creates any hard links.

That explains why omitting --owner and --group from the rsync command
line is a passable work-around in your case. Arguably, a better solution
might be to get sane Uid/Gids associated with files on the Cygwin box,
but only you can decide whether the effort would be worth it. (It may be
as simple as running 'mkpasswd' and 'mkgroup' with appropriate options.)

-SM
--


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]