Postinstall for mintty fails when installing "just for me"

Buchbinder, Barry (NIH/NIAID) [E]
Tue Aug 17 19:13:00 GMT 2010

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/
>> > /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
>> Hmm, the test at the top of the script is meant to avoid that, by
>> checking whether the 'All Users/Start Menu/Programs' folder is
>> writable. Any idea why that's saying yes when apparently it isn't
>> writable?
>On Aug 17 06:52, Andy Koppe wrote:
>I tried your script and it works fine for me. If I'm running as admin in
>a UAC-restricted shell, the test fails as expected.
>The problem is, we don't know anything about your environment, Barry.
>cygcheck output as requested by would be
>helpful, perhaps.


Please note:

$ cygcheck -s -v -r > cygcheck.out
/usr/bin/cygrunsrv: warning: OpenService failed for 'TapiSrv': Win32 error 5
Access is denied.

>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

$ 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

>> Is there a proper way for a postinstall script to find out whether
>> it's an install for all users or "Just Me"?
>Hmm, afaik no.
>You could try to write to All Users first and if that fails, write to
>the user's own Programs. Or, you could combine this with a call to `id
>-G' and test if the group 544 is in the users supplementary group list.
>But, maybe we should define a couple of useful, installation-specific
>arguments for postinstall scripts and change setup accordingly?

My experience with Windows Explorer is basically that everything is
locked down.  Though I have not tried creating a shortcut there, I
cannot move or delete shortcuts in
"C:\Documents and Settings\All Users\Start Menu"

I should have started by saying that, as a practical matter, this
is not a problem for me.  I have a minty shortcut and renaming
/etc/postinstall/ to /etc/postinstall/ stops
the error message from coming up.

Thanks for your attention to this matter.

And thanks for this upgrade of setup.  For some time now the
"pending" view had the same two empty packages appear each time
I ran setup.  Very annoying.  Now, they no longer show up.

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 93241 bytes
Desc: cygcheck.out
URL: <>
-------------- next part --------------
Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list