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: <42C68B1B.5010404@byu.net> Date: Sat, 02 Jul 2005 06:39:55 -0600 From: Eric Blake 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> <42A39676 DOT 9030208 AT scytek DOT de> <42A3A773 DOT 3C6AFA4A AT dessent DOT net> In-Reply-To: <42A3A773.3C6AFA4A@dessent.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Brian Dessent on 6/5/2005 7:31 PM: Sorry for a reply to an old thread, but I wanted to correct some misinformation: >>You mean special logic for windows file permissions (ACL?), not only >>using the owner/group/other scheme? > > I think that it recognises files ending in ".exe" and special-cases > them. > >>$ 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 There are two 'test's - the bash builtin, and /bin/test from coreutils. /bin/test uses access()/eaccess() (/usr/src/coreutils-5.3.0/src/test.c:552, /usr/src/coreutils-5.3.0/lib/euidaccess.c) to determine if a file is executable, which should leave it entirely in cygwin1.dll's hands (and rely on cygwin's handling of spelling, ACLs, and ownerships). bash uses its own home-baked method (/usr/src/bash-3.0/test.c:223,609) using stat() as its base, so it appears to ignore ACLs. Please let me know if either test or /bin/test gets a wrong answer in the presence of ACLs, in which case I can report the bug upstream. The original email made it sound like only perl had the issue, and only when not using perl's access library. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net cygwin bash/coreutils maintainer -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCxosa84KuGfSFAYARAllfAKCN6wmWaX42PjKesX4azTEqRWTLwACg2YhI HwKmzthl40ejmYiT0EXmhSU= =5FJL -----END PGP SIGNATURE----- -- 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/