www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/06/17:39:00

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_UNSUB22,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
From: "Andy Hall" <fixpertise-consulting AT comcast DOT net>
To: <cygwin AT cygwin DOT com>
References: <9872BD92701C494686D002F1620610D0 AT ahallpc> <20101006084740 DOT GS5480 AT calimero DOT vinschen DOT de> <5F51089A175A41AC8A69F08E6335F64C AT ahallpc> <20101006204250 DOT GB5480 AT calimero DOT vinschen DOT de>
Subject: RE: In what way is /cygdrive special WRT to permissions?
Date: Wed, 6 Oct 2010 14:38:47 -0700
Message-ID: <356FBB512633488981F699EB2A150831@ahallpc>
MIME-Version: 1.0
In-Reply-To: <20101006204250.GB5480@calimero.vinschen.de>
X-IsSubscribed: yes
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

There is no doubt that this behavior changed from 1.5 to 1.7.  The instant I
upgraded from 1.5 to 1.7.7,  build scripts that test for the abilty to write
to the directories in F: instantly started reporting the directories were
not writeable using test -w, yet you can still create and write files via
Cygwin.  

Furthermore, the user build can also create files and directories in F:
using windows, so the OS apparently thinks the user build has these access
rights as well.  Is it possible that test -w may have a bug?

The thing that is weird is that the explicit mount of //vega/repository on
/repos with noacl has the the desireable effect.  It you log in as
Administrator the files appear to be owned by Administrator and if you log
in as build, the files appear to be owned by build.  I would assume this is
the result of "guessing" the permissions when noacl is used.

The explict mounting of //vega/repository is the workaround I eventually
settled on.

Andy 

> On Oct  6 12:43, Corinna Vischen wrote:
> On Oct  6 13:19, Andy Hall wrote:
> > Notice that the test -w /cygdrive/f/builds reports that
> /cygdrive/f/builds
> > is not writeable, yet you can create and write files in
> /cygdrive/f/builds!
> > THIS IS INCONSTENT BEHAVIOR.  Cygwin 1.5 did not have this behavior.
> 
> I somehow doubt that.  I'm just not sure if I can explain that
> correctly, given how tired I am.  The difference is that under 1.5 all
> smb drives were by default mounted with "noacl", aka
> "CYGWIN=nosmbntsec".  So all permissions were just faked and Cygwin's
> access call was more or less a wild guess.  With a drive mounted with
> "acl" the OS (yes, Windows itself) is asked if the current user has
> write permissions, based on the current user token and the ACL of the
> file.  Apparently "non writable" is what you get here, because the ACL
> returned by the Samba drive only contains the ACEs for the Linux user and
> group, not for your current Windows user and group.  You can add these
> Linux user's and groups to your local passwd and group file (see
> http://cygwin.com/cygwin-ug-net/using-utils.html#mkpasswd and
> http://cygwin.com/cygwin-ug-net/using-utils.html#mkgroup), but it won't
> change what the OS returns in the access check.  I'm sorry, this bugs
> me for years, but there nothing Cygwin can do about this.  Nor can Samba
> do anything.  Yes, I asked on the samba developer mailing list at one
> point...
> 
> The fact that the admin can write is normal, too, since admins (those
> not restricted by UAC) always have write permissions under Cygwin 1.7.7,
> just like a root user under Linux.  That's probably even documented
> somewhere, I just don't recall where.
> 
> 
> Corinna
> 
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat
> 
> --
> 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




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

- Raw text -


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