1.7.1: dash/ash test -x broken?
Eric Blake
ebb9@byu.net
Wed Feb 10 15:40:00 GMT 2010
Cobb, Christopher (Contr) (IS <Christopher.Cobb <at> ngc.com> writes:
> $ dash -c "test -x '$JAVACMD';"' echo $?'
> 1
>
> $ ash -c "test -x '$JAVACMD';"' echo $?'
> 1
dash and ash are identical.
> $ getfacl.exe "$JAVACMD"
> # file: /c/Program Files/Java/jdk1.5.0_18/bin/java
> # owner: Administrators
> # group: SYSTEM
> user::rwx
> group::rwx
> group:Users:r-x
> group:Power Users:rwx
> mask:rwx
> other:---
>
> $ stat "$JAVACMD"
> File: `/c/Program Files/Java/jdk1.5.0_18/bin/java'
> Size: 53344 Blocks: 56 IO Block: 65536 regular file
> Device: 548b6deeh/1418423790d Inode: 1407374883580908 Links: 1
> Access: (0770/-rwxrwx---) Uid: ( 544/Administrators) Gid: ( 18/
> SYSTEM)
> Access: 2010-02-09 16:23:09.702221400 -0500
> Modify: 2009-02-25 01:47:30.000000000 -0500
> Change: 2009-11-19 15:03:03.707455600 -0500
>
> $ id
> uid=720693(cobbch) gid=10513(Domain_Users)
> groups=0(root),544(Administrators),545(Users),1004(SophosUser)
Yep - it's an ACL issue. Since you (cobbch) are not the owner
(Administrators), and your group membership (root, Administrators, Users,
SophosUser) does not include the group owner (SYSTEM), and since the mode does
not grant any permissions to others, dash's use of stat() thinks you have no
rights. But in reality, the ACLs state that anyone in group users (which
includes you) has additional rights beyond what stat() can see, and hence
euidaccess() (which bash uses) gives the correct answer.
I've reported this upstream. Meanwhile, I guess that means its time for me to
respin a dash package. Thanks for the report.
--
Eric Blake
volunteer cygwin dash maintainer
--
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
More information about the Cygwin
mailing list