This is the mail archive of the
mailing list for the Cygwin project.
Re: 1.7.1: dash/ash test -x broken?
Cobb, Christopher (Contr) (IS <Christopher.Cobb <at> ngc.com> writes:
> $ dash -c "test -x '$JAVACMD';"' echo $?'
> $ ash -c "test -x '$JAVACMD';"' echo $?'
dash and ash are identical.
> $ getfacl.exe "$JAVACMD"
> # file: /c/Program Files/Java/jdk1.5.0_18/bin/java
> # owner: Administrators
> # group: SYSTEM
> group:Power Users:rwx
> $ 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/
> 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)
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.
volunteer cygwin dash maintainer
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple