Cygwin on Windows Vista is broken…

and one of the reasons it’s broken is because of this bizarre design decision:

Now consider a console application called install.exe. It’s neither a GUI application,
nor is it an installer application in the Windows sense. It’s just called install.exe. In my
case it’s part of GNU coreutils and it’s called install because it’s usual task is to install
software on the system. However, it’s perfectly valid to call install as normal user and
use it to install stuff into a subdirectory on which you have permissions. This is what
happens when running under Cygwin (processes are created using CreateProcess):

$ which install
$ /usr/bin/install
bash: Permission denied.
$ strace /usr/bin/install
strace: error creating process C:/cygwin/bin/install, (error 740)
$ net helpmsg 740

The requested operation requires elevation.

$ mv /usr/bin/install.exe /usr/bin/huh.exe
$ /usr/bin/huh
/usr/bin/huh: Missing file operand
Try `/usr/bin/huh –help ‘ for more information.
This is the expected output.

The same bug occurs when the file is called, for instance, instal.exe, ginstall.exe,
instalx.exe, setup, vsetup, or even this-is-not-an-installer.exe. It does not occur if the
file does not contain the substring “instal” or “setup”.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.