cp.test fails on ext3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acl (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: acl
When I try the cp.test test on ext3 on feisty, it has two failures:
$ perl run cp.test
main::process_
main::process_
[3] $ umask 022 -- ok
[4] $ mkdir d -- ok
[5] $ cd d -- ok
[6] $ touch f -- ok
[7] $ setfacl -m u:bin:rw f -- ok
[8] $ ls -l f | awk -- '{ print $1 }' -- ok
[11] $ cp f g -- ok
[12] $ ls -l g | awk -- '{ print $1 }' -- ok
[15] $ rm g -- ok
[16] $ cp -p f g -- ok
[17] $ ls -l f | awk -- '{ print $1 }' -- ok
[20] $ mkdir h -- ok
[21] $ echo blubb > h/x -- ok
[22] $ cp -rp h i -- ok
[23] $ cat i/x -- ok
[26] $ rm -r i -- ok
[27] $ setfacl -R -m u:bin:rwX h -- ok
[28] $ getfacl --omit-header h/x -- failed
user::rw- | user::rw-
user:bin:rwx ? user:bin:rw-
group::r-- | group::r--
mask::rwx ? mask::rw-
other::r-- | other::r--
[36] $ cp -rp h i -- ok
[37] $ getfacl --omit-header i/x -- failed
user::rw- | user::rw-
user:bin:rwx ? user:bin:rw-
group::r-- | group::r--
mask::rwx ? mask::rw-
other::r-- | other::r--
[45] $ cd .. -- ok
[46] $ rm -r d -- ok
22 commands (20 passed, 2 failed)
Reading the manpage for setfacl it seems that expecting the execute bit for bin to be set is wrong. It will only bet set for an "X" change if the "x" bit is already set for some other user and given the origin of the h/x file (and by extension the i/x file) it should not have an execute bit set on it.
This is most definitely an "upstream" issue but I can't seem to figure out who "upstream" is.
attempting to use setfacl with the 'X' (capital x) bit on reiserfs under edubuntu 7.04 behaves very oddly when the mask is set
so for example:
user::rwX
group::rwX
other::---
mask::rwX # uppercase 'x'
group:teachers:rwX
will work properly on files - the 'x' bit is set only if they were already executable.
however, if the following change is made:
mask::rwx # lowercase 'x'
then it does not work, and the groups of all files are given 'x' even if they didn't have it already.
This is *not* documented on the man pages for acl.
We solved our problem by removing all existing ACL's using the setfacl -R -b command, and then resetting using masks which used 'X'.