This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Executable bit check


On 11/04/2010 03:57 PM, Illia Bobyr wrote:
> $ ll abc
> -rw-r--r--+ 1 ibobyr Domain Users Nov 21  4 16:44 abc

See that +?  That means there are ACLs in play.

> 
> $ test -x abc && echo Executable
> Executable

Likely, one of those ACLs is still making the file executable.

What does 'getfacl abc' say?

> 
> $ ./abc
> Hm...

One other thing to point out.  This will happen on FAT and other
brain-dead filesystems that lack true execute bits, where chmod -x has
no effect (since there's no bit to disable), such that cygwin always
represents the file as executable on those file systems if it has a
she-bang (well, depending on your mount options).  But given that FAT
also doesn't support ACLs, it's not the problem you are facing.

> 
> For me the most annoying part is that "test -x" says that I can execute 
> a file that I just did "chmod -x" on.

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.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]