Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-IsSubscribed: yes Content-Transfer-Encoding: 8bit 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/