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: Postinstall for mintty fails when installing "just for me"


On 18 August 2010 09:43, Corinna Vinschen wrote:
> 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.

Thanks very much for spotting that.


> 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

Hmm, I'm a bit afraid that might find creative new ways of going wrong. ;)

I think I'll go with your previous suggestion of just going ahead and
trying to create the 'All Users' shortcut and falling back to the
user's start menu if that fails.

Although, perhaps there's a way to tell from $CYGWINROOT whether we're
dealing with an install for all users or "just me"?

Andy

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