This is the mail archive of the
mailing list for the Cygwin project.
bash 'test -x' gives incorrect results with group permissions?
- From: Eric Tiffany <etiffany at alum dot mit dot edu>
- To: cygwin at cygwin dot com
- Date: Wed, 05 Mar 2003 16:10:35 -0500
- Subject: bash 'test -x' gives incorrect results with group permissions?
I encountered a perplexing situation with file permissions. I am running
cygwin 1.3.20 and bash 2.05b.0(8).
I have an executable with the following permissions:
$ ls -ln /c/j2sdk1.4.1_01/bin/java
-rwxrwx---+ 1 544 18 24672 Sep 30 03:08
And here is my user info:
uid=1006(Eric Tiffany) gid=513(None)
If I run getfacl, I see the following:
$ getfacl.exe -a /c/j2sdk1.4.1_01/bin/java
getfacl.exe -a /c/j2sdk1.4.1_01/bin/java
# file: /c/j2sdk1.4.1_01/bin/java
# owner: Administrators
# group: SYSTEM
I can execute the file from the command line.
However, if I say 'test -x /c/j2sdk1.4.1_01/bin/java' in a script, it
returns false. This seems wrong just based on the fact that I actually can
exec the file. However, it also seems to contradict the permissions set for
the file, if I am interpreting the results of getfacl correctly.
Is this a bug?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html