perl -x doesn't recognize file as executable
Volker Quetschke
quetschke@scytek.de
Sun Jun 5 16:49:00 GMT 2005
I stumbled over the following problem, perl's -x doesn't recognize
some files as executable, even though they are and test -x does.
(The following example uses nsis.exe but something like java.exe
would show the same problem.)
Examples:
$ test -x "/cygdrive/c/Programme/NSIS/NSIS.exe" && echo "executable"
executable
$ perl -e 'if ( -e "/cygdrive/c/Programme/NSIS/NSIS.exe" ) {print "exist";}'
exist
*but*
$ perl -e 'if ( ! -x "/cygdrive/c/Programme/NSIS/NSIS.exe" ) {print "not
executable";}'
not executable
I'm logged in as user q:
$ 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*
q@lisi ~
$ getfacl /cygdrive/c/Programme/NSIS/NSIS.exe
# file: /cygdrive/c/Programme/NSIS/NSIS.exe
# owner: Administratoren
# group: none
user::rwx
group::---
group:SYSTEM:rwx
group:Benutzer:r-x
group:Hauptbenutzer:rwx
mask:rwx
other:---
System information:
$ cygcheck -c | grep perl
perl 5.8.6-4 OK
$ uname -a
CYGWIN_NT-5.0 lisi 1.5.17(0.129/4/2) 2005-05-25 19:38 i686 unknown
unknown Cygwin
(I can provide a cygcheck output if desired)
Volker
--
PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050605/9e2a0cda/attachment.sig>
More information about the Cygwin
mailing list