perl -x doesn't recognize file as executable

Brian Dessent brian@dessent.net
Sun Jun 5 19:55:00 GMT 2005


Volker Quetschke wrote:

> $ test -x "/cygdrive/c/Programme/NSIS/NSIS.exe" && echo "executable"
> executable

coreutils have special logic for binaries with .exe suffix, which is why
this works.

> $ perl -e 'if ( ! -x "/cygdrive/c/Programme/NSIS/NSIS.exe" ) {print "not
> executable";}'
> not executable

Technically the file is not executable:

> $ id -a
> uid=1001(q) gid=513(none)
> groups=0(root),513(none),544(Administratoren),545(Benutzer)
> 
> Here are some informations about the file:
> 
> $ ls -l /cygdrive/c/Programme/NSIS/NSIS.exe
> -rwx------+ 1 Administratoren none 254976 Nov 10  2003
> /cygdrive/c/Programme/NSIS/NSIS.exe*

The permissions on the file indicate that it is only executable by the
owner (Administratoren) which is not the account you are running the
command from.  If you add +x for the group or chown the file it should
work.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list