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: <42A39676.9030208@scytek.de> Date: Sun, 05 Jun 2005 20:19:02 -0400 From: Volker Quetschke User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) 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> <42A35971 DOT 8C69A2C5 AT dessent DOT net> In-Reply-To: <42A35971.8C69A2C5@dessent.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig9775CFD5B5ABBBA3D3F81801" X-IsSubscribed: yes --------------enig9775CFD5B5ABBBA3D3F81801 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi! >>$ 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. You mean special logic for windows file permissions (ACL?), not only using the owner/group/other scheme? >>$ perl -e 'if ( ! -x "/cygdrive/c/Programme/NSIS/NSIS.exe" ) {print "not >>executable";}' >>not executable > > Technically the file is not executable: I beg to differ ;) Technically it depends how you define executable, if you only know ugo permissions (or whatever this scheme is called) then it it *not* executable. If you decide to just test it and try to execute it you will see that it executes quite well. So IMHO it is executable, but technically some programs might not see that because they are looking at the wrong place. >>$ id -a >>uid=1001(q) gid=513(none) >>groups=0(root),513(none),544(Administratoren),545(Benutzer) compare -------------------------------------------^^^^^^^^^^ $ 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 ^ with ------------| So it is executable. But ugo rights do not show this > 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. I know that I can work around this, but Joe Average might not have the rights to change the ownership of a file because he might not be in the Admin group. Volker -- PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D --------------enig9775CFD5B5ABBBA3D3F81801 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCo5Z7PTXJup+KeF0RAqFWAJ9JwO9dEKCsvvZ8/dJ5x1ZZt+MCegCfRiFT NnsqP1KqAQU8xRb+SH/ERFc= =bc/P -----END PGP SIGNATURE----- --------------enig9775CFD5B5ABBBA3D3F81801--