X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org X-Yahoo-SMTP: Uu383n6swBCEN1G9up0WSnxbvN8fCPmk Message-ID: <4CD35A71.3030707@cygwin.com> Date: Thu, 04 Nov 2010 21:14:25 -0400 From: "Larry Hall \(Cygwin\)" Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Executable bit check References: <76B81B8B64B6254B98733990F38621DA6A0F AT sron-chi-exc05 DOT ronin DOT roncap DOT com> In-Reply-To: <76B81B8B64B6254B98733990F38621DA6A0F@sron-chi-exc05.ronin.roncap.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 On 11/4/2010 8:36 PM, Illia Bobyr wrote: > Hi, > > It seems that Cygwin does not check for executable bit before it allows > a script to run, does it? > > $ rm abc > > $ cat<abc > > #!/bin/sh > > echo Hm... > > EOF > > $ ll abc > -rw-r--r--+ 1 ibobyr Domain Users Nov 21 4 16:44 abc > > $ test -x abc&& echo Executable > Executable >>> What does 'getfacl abc' say? > > >> $ getfacl abc >> # file: abc >> # owner: ibobyr >> # group: Domain Users >> user::rw- >> group::r-- >> group:SYSTEM:rwx >> group:Administrators:rwx >> group:Users:r-x >> mask:rwx >> other:r-- >>> There's more to permissions than just the 9 unix mode bits. You really >>> CAN execute the file if test -x says you can; the question should rather >>> be why 'chmod -x' didn't remove all execute permissions, and that >>> usually boils down to ACL settings. So, are you part of the 'Users' or 'Administrators' group? If so, you have executable permission from the ACL. Try removing those. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple