bash -r operator not understanding ACLs

Marcus Better <[email protected]> Fri, 26 Aug 2005 12:51:41 +0200
Newsgroups gmane.linux.file-systems.acl.devel
Message-ID <[email protected]>
Hello,

I have a file which is owned by a different user, but with ACLs set so
that it is readable by me. However if I use the bash -r operator to test
if the file is readable I get a negative result. I also get the same
result using the Perl -r operator.

I am running Debian GNU/Linux testing/unstable, kernel 2.6.12 and bash
3.00.16(1)-release. The file system is ext3.

As I understand it this is incorrect behaviour, but perhaps I have
misunderstood something? It causes all sorts of scripts to fail that
rely on the -r operator.

Here is a sample session:

-----------------------------------------------------------------------
# Logged in as "marcus". The file is owned by "someone".
~$ ls -l p6060001.jpg
-rwxr-x---+ 1 someone someone 399944 2005-06-16 19:43 p6060001.jpg*

# The file is readable by me:
~$ file p6060001.jpg
p6060001.jpg: JPEG image data, JFIF standard 1.01

~$ getfacl p6060001.jpg
# file: p6060001.jpg
# owner: someone
# group: someone
user::rwx
user:marcus:rwx                 #effective:r-x
user:someone:rwx               #effective:r-x
group::r-x
mask::r-x
other::---

# But the -r operator says it is not readable!
~$ [ ! -r p6060001.jpg ] && echo "not readable"
not readable
~$
-----------------------------------------------------------------------------
_______________________________________________
acl-devel mailing list
[email protected]
http://acl.bestbits.at/mailman/listinfo/acl-devel