www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <42A3535B.8050103@familiehaase.de> |
Date: | Sun, 05 Jun 2005 21:32:43 +0200 |
From: | "Gerrit P. Haase" <gerrit AT familiehaase DOT de> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: perl -x doesn't recognize file as executable |
References: | <42A32D8C DOT 9080408 AT scytek DOT de> <d7vbdm$va8$1 AT sea DOT gmane DOT org> |
In-Reply-To: | <d7vbdm$va8$1@sea.gmane.org> |
X-IsSubscribed: | yes |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id j55JWtoY031572 |
Krzysztof Duleba wrote: > Volker Quetschke wrote: > > >>I stumbled over the following problem, perl's -x doesn't recognize >>some files as executable, even though they are and test -x does. > > > It works for me if the file is group or world executable. Works for me anyway, as long as I am probing a Cygwin executable: $ chmod 777 /usr/bin/cat.exe $ ls -l /usr/bin/cat.exe -rwxrwxrwx+ 1 gerrit ???????? 21504 Apr 14 14:26 /usr/bin/cat.exe $ perl -e 'if ( ! -x "/usr/bin/cat.exe" ) {print "not executable\n";} else {print "executable\n";}' executable $ chmod 755 /usr/bin/cat.exe $ ls -l /usr/bin/cat.exe -rwxr-xr-x+ 1 gerrit ???????? 21504 Apr 14 14:26 /usr/bin/cat.exe $ perl -e 'if ( ! -x "/usr/bin/cat.exe" ) {print "not executable\n";} else {print "executable\n";}' executable $ chmod 700 /usr/bin/cat.exe $ ls -l /usr/bin/cat.exe -rwx------+ 1 gerrit ???????? 21504 Apr 14 14:26 /usr/bin/cat.exe $ perl -e 'if ( ! -x "/usr/bin/cat.exe" ) {print "not executable\n";} else {print "executable\n";}' executable $ chmod 500 /usr/bin/cat.exe $ ls -l /usr/bin/cat.exe -r-x------+ 1 gerrit ???????? 21504 Apr 14 14:26 /usr/bin/cat.exe $ perl -e 'if ( ! -x "/usr/bin/cat.exe" ) {print "not executable\n";} else {print "executable\n";}' executable When I test e.g. mozilla.exe which I'm not the owner: $ ls -l /c/Programme/Mozilla/mozilla.exe -rwx------+ 1 Administratoren Domänen-Benutzer 98192 May 11 14:07 /c/Programme/Mozilla/mozilla.exe $ perl -e 'if ( ! -x "/c/Programme/Mozilla/mozilla.exe" ) {print "not executable\n";} else {print "executable\n";}' not executable Gerrit -- =^..^= -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |