cp.test fails on ext3

Bug #116930 reported by Brian J. Murrell
4
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_test() called too early to check prototype at run line 47.
main::process_test() called too early to check prototype at run line 60.
[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.

Revision history for this message
Jason Stewart (jason-e-stewart) wrote : Re: 'X' has strange behavior with mask set

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'.

Revision history for this message
Jason Stewart (jason-e-stewart) wrote :

as a comment on the original posted bug, I noticed that the setfacl command did not specify a mask, and so it created a mask. The mask was 'rwx', and so it had the same behavior as I saw. If the mask was set explicitly to 'rwX', the command would work.

Revision history for this message
Andreas Moog (ampelbein) wrote : Old standing report

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you for taking the time to report this bug and helping to make
Ubuntu better. You reported this bug a while ago and there hasn't been
any activity in it recently. We were wondering is this still an issue
for you? Can you try with latest Ubuntu release? Thanks in advance.

 status incomplete
 subscribe

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiwTN8ACgkQ06FgkPZwicSISgCgluKMmrY7wVEbnrez3yZeihyd
OyoAoJ1zkQEB3hOE23RpOv2ZCCraxNEU
=mScf
-----END PGP SIGNATURE-----

Changed in acl:
status: New → Incomplete
Revision history for this message
Andreas Moog (ampelbein) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in acl:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.