This is the mail archive of the
mailing list for the Cygwin project.
Re: permissions on .exe files
- From: Igor Peshansky <pechtcha at cs dot nyu dot edu>
- To: Hemal Pandya <hemal dot pandya at gmail dot com>
- Cc: cygwin at cygwin dot com
- Date: Fri, 21 Jul 2006 11:44:56 -0400 (EDT)
- Subject: Re: permissions on .exe files
- References: <firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
On Fri, 21 Jul 2006, Hemal Pandya wrote:
> If I create a file somefile.exe "outside cygwin" then cygwin reports
> that it is executable. But if the file is created by cygwin then it
> does not become executable unless explicitly set.
This is correct and expected behavior.
> One implication of this is that when I extract a .zip using cygwin
> unzip then the .exe, .dll, .bat etc do not get the executable
That's a problem with the ZIP format, which does not keep permissions.
> Is there a way to tell cygwin to assign u+x for the files created from
> cygwin for which it would have otherwise assumed this permission?
Cygwin does not assume any permissions. Neither does Windows. However,
Windows does have ACL inheritance rules that set everything to be
You can tell Cygwin to use default Windows permissions by temporarily
setting CYGWIN to nontsec, i.e., run
CYGWIN=nontsec unzip somefile.zip
This would not assign u+x, but rather a+x. There is no way that I know of
to get Cygwin to automatically assign only u+x.
> hpandya@hpandya-xp2 /tmp/ll Fri Jul 21 11:47:43 2006
> $ cmd /c "dir > in_windows.exe"
> hpandya@hpandya-xp2 /tmp/ll Fri Jul 21 11:47:50 2006
> $ ls > in_cygwin.exe
> hpandya@hpandya-xp2 /tmp/ll Fri Jul 21 11:47:58 2006
> $ ls -l
> total 2
> -rw-r--r-- 1 hpandya &-Users 29 Jul 21 11:47 in_cygwin.exe
> -rwxr-xr-x 1 hpandya &-Users 345 Jul 21 11:47 in_windows.exe
> hpandya@hpandya-xp2 /tmp/ll Fri Jul 21 11:48:02 2006
BTW, the above would happen even if you didn't have the .exe extension.
Windows does not do special magic for .exe files -- it just makes
everything executable. A pretty annoying feature, if you ask me.
|\ _,,,---,,_ email@example.com | firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html