This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: perl -x doesn't recognize file as executable
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Sun, 05 Jun 2005 12:58:41 -0700
- Subject: Re: perl -x doesn't recognize file as executable
- References: <42A32D8C.9080408@scytek.de>
- Reply-to: cygwin at cygwin dot com
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/