This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: perl -x doesn't recognize file as executable


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]