delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/18/04:43:39

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 18 Aug 2010 10:43:23 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Postinstall for mintty fails when installing "just for me"
Message-ID: <20100818084323.GN11340@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <0105D5C1E0353146B1B222348B0411A20945256668 AT NIHMLBX02 DOT nih DOT gov> <AANLkTinZ+a6w71LKGUvoytvJBNONeC6kYMweTjCUXN-R AT mail DOT gmail DOT com> <20100817084858 DOT GA16404 AT calimero DOT vinschen DOT de> <0105D5C1E0353146B1B222348B0411A2094525666F AT NIHMLBX02 DOT nih DOT gov>
MIME-Version: 1.0
In-Reply-To: <0105D5C1E0353146B1B222348B0411A2094525666F@NIHMLBX02.nih.gov>
User-Agent: Mutt/1.5.20 (2009-06-14)
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 Aug 17 15:12, Buchbinder, Barry (NIH/NIAID) [E] wrote:
> Corinna Vinschen sent the following at Tuesday, August 17, 2010 4:49 AM
> >> On 17 August 2010 02:26, Buchbinder, Barry wrote:
> >> > $ bash --norc --noprofile /etc/postinstall/mintty.sh
> >> > /bin/mkdir: cannot create directory `/c/Documents and Settings/All
> >> > Users/Start Menu/Programs/Cygwin': Permission denied
> >> > mkshortcut: Saving "C:\Documents and Settings\All Users\Start Menu\Programs\Cygwin\mintty.lnk" failed; does the target directory exist?
> >> > /bin/chmod: cannot access `/c/Documents and Settings/All Users/Start
> >> > Menu/Programs/Cygwin/mintty.lnk': No such file or directory echo $?
> >> > 1
> >[...]
> >The problem is, we don't know anything about your environment, Barry.
> >cygcheck output as requested by http://cygwin.com/problems.html would be
> >helpful, perhaps.
> 
> Attached.
> 
> Please note:
> 
> $ cygcheck -s -v -r > cygcheck.out
> /usr/bin/cygrunsrv: warning: OpenService failed for 'TapiSrv': Win32 error 5
> Access is denied.

That usually just means you don't have admin privs.

> 
> >As is getfacl/cacls output for the "/c/Documents and
> >Settings/All Users/Start Menu/Programs" directory.
> 
> $ getfacl '/c/Documents and Settings/All Users/Start Menu/Programs'
> # file: /c/Documents and Settings/All Users/Start Menu/Programs
> # owner: BBuchbinder
> # group: Domain Users
> user::rwx
> group::r-x
> other:r-x
> mask:rwx
> 
> $ cacls 'C:\Documents and Settings\All Users\Start Menu\Programs'
> C:\Documents and Settings\All Users\Start Menu\Programs BUILTIN\Administrators:(OI)(CI)F
>                                                         CREATOR OWNER:(OI)(CI)(IO)F
>                                                         NT AUTHORITY\SYSTEM:(OI)(CI)F
>                                                         BUILTIN\Users:(OI)(CI)R
>[...]

Here's the actual problem:

  cygdrive prefix     /         system  binary,noacl,posix=0,auto

The cygdrive prefix is set to the mount option "noacl".  So the output
from getfacl or ls or stat for this directory shows just fake
permissions based on the DOS R/O flag.

You're not an admin, so you're not allowed to write to this directory,
see the cacls output.  However, since the cygdrive prefix is mounted
with "noacl", Cygwin tools just don't know it.

Andy, to workaround this, you *could* create a user mount first which
has no "noacl", then use the user mount to check permissions, and
eventually umount again.  Like this:

  PROGS=/tmp/.mintty-postinstall-$$
  mount -f "`cygpath -APm`" $PROGS
  if [ -w "$PROGS" ]; then
    [...]
  else
    [...]
  fi
  umount $PROGS


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

- Raw text -


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