delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/08/25/11:08:56

X-Spam-Check-By: sourceware.org
Date: Sat, 25 Aug 2007 08:08:10 -0700
From: David Rothenberger <daveroth AT acm DOT org>
Subject: Re: rsync between WinNT and Linux (--perms --owner --group)
In-reply-to: <faoll8$b9f$1@sea.gmane.org>
To: cygwin AT cygwin DOT com
Message-id: <46D045DA.5040305@acm.org>
MIME-version: 1.0
References: <fanbbl$dmv$1 AT sea DOT gmane DOT org> <fanmtr$gis$1 AT sea DOT gmane DOT org> <faoll8$b9f$1 AT sea DOT gmane DOT org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 8/25/2007 12:27 AM, Richard Ivarson wrote:
> René Berber wrote:
>> Richard Ivarson wrote:
>>> Does Cygwin's rsync send the user and group names to the Linux rsync at
>>> all?
>>
>> No, rsync used uid / gid, the numeric user/group id, not the names,
>> and unless you did something to synchronize them they are 
>> different.
> 

[snip]

> So I suppose Cygwin rsync (tar etc) always uses the UID/GID, like you 
> say, and so sees "no match" on the destination system in my case... That 
> explains what I am seeing.

rsync preserves the user for me as long as the name is the same, even if 
the UIDs are different, at least when going from Cygwin to Linux[*].

On 8/24/2007 12:25 PM, Richard Ivarson wrote:
> - "Privatedir" (users "joseph", "mary" and group "family" have got
> "rwx")

How to both "joseph" and "mary" have rwx? Are you using Windows ACLs to 
specify this? rsync ignores them. It will only preserve the standard 
permission bits, not the Windows ACLs.

> When I start Cygwin's rsync with the --archive option, like this: 
> [joseph AT WinNT]> rsync --archive Freedir/ Privatedir/ joseph AT host:/Mirror/

Also, note that according to the rsync man page, the owner is preserved 
only if the receiving rsync is running as root (i.e., root AT host, not 
joseph AT host). So in your example, "Privatedir" would have been owned by 
joseph on the receiving side even if it was owned by another user on the 
sending side.

[*] I could not get rsync to preserve ownership when going from Linux to 
Cygwin. I tried changing /etc/passwd to call the SYSTEM user "root", but 
rsync gives an error in this case:

rsync: chown "/tmp/.t.txt.xOgIAf" failed: Invalid argument (22)

-- 
David Rothenberger  ----  daveroth AT acm DOT org

First Law of Socio-Genetics:
         Celibacy is not hereditary.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019