delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/08/20/12:24:42

X-Spam-Check-By: sourceware.org
Date: Mon, 20 Aug 2007 12:24:13 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: DaveB <daveb AT quisinesoftware DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: rsync problems from Vista installed cygwin, ok on XP
In-Reply-To: <12232786.post@talk.nabble.com>
Message-ID: <Pine.GSO.4.63.0708201218490.13622@access1.cims.nyu.edu>
References: <12125308 DOT post AT talk DOT nabble DOT com> <20070817082808 DOT GM28407 AT calimero DOT vinschen DOT de> <12200543 DOT post AT talk DOT nabble DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0708171225440 DOT 15027 AT access1 DOT cims DOT nyu DOT edu> <12219269 DOT post AT talk DOT nabble DOT com> <20070819074708 DOT GB4166 AT calimero DOT vinschen DOT de> <12232786 DOT post AT talk DOT nabble DOT com>
MIME-Version: 1.0
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 Mon, 20 Aug 2007, DaveB wrote:

> Corinna Vinschen-2 wrote:
> >
> > On Aug 18 21:06, DaveB wrote:
> >> So... two interesting followon points...
> >>
> >> 1. Why didn't the ACLs get set to something reasonable as opposed to
> >> 000 in the first place when I created this little test area in Vista?
> >> After all, I
> >
> > The directory has been created using native Windows tools.  The
> > permissions given using native Windows tools *are* strange and don't
> > follow POSIX rules. It's perfectly valid that you can access a
> > directory under Windows but get 000 POSIX permissions.  You did see
> > the '+' at the end of the permission in ls -l?
>
> OK, I now see this + and had no idea what it meant... but have now found
> the doc in cygwin by typing "info ls", where it says...
>
>      Following the file mode bits is a single character that specifies
>      whether an alternate access method such as an access control list
>      applies to the file.  When the character following the file mode
>      bits is a space, there is no alternate access method.  When it is
>      a printing character, then there is such a method.
>
>      For a file with an extended access control list, a `+' character is
>      listed.  Basic access control lists are equivalent to the
>      permissions listed, and are not considered an alternate access
>      method.
>
> Interesting.  So if it knows there is an ACL which overrides the ------
> permissions that were inherited from C:\ then why can't the cygwin port
> of rsync allow a Windows-friendly option for rsync'ing these files...
> even if it cannot directly read the ACL maybe it could allow you to
> invoke some special rsync permissions sync'ing flag?
>
> I looked in the man rsync doc, and found some flags that might be
> helpful ... namely -p -E and --chmod.  But even chmod=XXX doesn't quite
> let you do automatically what would make sense, which is to create
> rsync'd files with rwx for the exe's and rw for the others.
>
> Not sure what the best way out of here is...??? I'm beginning to
> understand this a bit better, but it sure is a minefield... will
> generate ongoing problems for innocent future users.

You misunderstand your problem.  The problem is not that rsync on the
source side cannot read the files (it can, since the ACLs allow it to).
The problem is that the rsync on the destination side copies only the Unix
permission bits from the source side (which are 000), and then it is
unable to write to that directory (because the permissions are 000).

What you want is some way of getting rsync to not copy permissions, or
making rsync ACL-aware.  I don't know of any way to do either, but then, I
haven't used rsync extensively.  Perhaps the documentation holds the
answer.

> PS Can anyone point to a good article on ACL that explains the
> relationship to these ls -l permissions also?

I'm sure MSDN has a lot of info on ACLs in general and on their use in
Windows.  If you want to know specifically how Cygwin maps ACLs to Unix
permission bits, see <http://cygwin.com/cygwin-ug-net/ntsec.html>.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Belief can be manipulated.  Only knowledge is dangerous.  -- Frank Herbert

--
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