[LU-4680] Invalid system.posix_acl_default breaks umask on ZFS MDT Created: 27/Feb/14  Updated: 05/Aug/14  Resolved: 05/Aug/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ned Bass Assignee: Lai Siyao
Resolution: Duplicate Votes: 0
Labels: llnl, prz
Environment:

lustre-2.4.0-19chaos (see http://github.com/chaos/lustre)


Issue Links:
Related
is related to LU-5150 NULL pointer dereference in posix_acl... Resolved
is related to LU-5434 Invalid system.posix_acl_access break... Resolved
Severity: 3
Rank (Obsolete): 12867

 Description   

GNU cp -rp tries to store a default ACL on the destination if the source filesystem supports ACLs, even if the source file has no default ACL. If the destination is a Lustre filesystem with a ZFS MDT, an invalid or empty default ACL is applied, causing Lustre to bypass the umask in the destination directory. This shell snippet demonstrates the problem:

src=`mktemp -d XXXX`
dest=`mktemp -u XXXX`
getfattr -n system.posix_acl_default $src
cp -rp $src $dest
getfattr -n system.posix_acl_default $dest
umask
touch $dest/foo
ls -l $dest/foo

Example output:

# oslic6 /p/lscratchv/bass6 > src=`mktemp -d XXXX`
# oslic6 /p/lscratchv/bass6 > dest=`mktemp -u XXXX`
# oslic6 /p/lscratchv/bass6 > getfattr -n system.posix_acl_default $src 
# file: g9Lo
system.posix_acl_default

# oslic6 /p/lscratchv/bass6 > cp -rp $src $dest
# oslic6 /p/lscratchv/bass6 > getfattr -n system.posix_acl_default $dest
# file: U0tY
system.posix_acl_default=0sAgAAAA==

# oslic6 /p/lscratchv/bass6 > umask
0077
# oslic6 /p/lscratchv/bass6 > touch $dest/foo
# oslic6 /p/lscratchv/bass6 > ls -l $dest/foo
-rw-rw-rw- 1 root root 0 Feb 27 14:20 U0tY/foo

Note the file foo has mode 0666 even though umask was 0077. Running this test on an ldiskfs filesystem shows that the invalid/empty ACL is discarded, so umask still works as expected.



 Comments   
Comment by Ned Bass [ 27/Feb/14 ]

Note that the latest ZFS on Linux master has POSIX ACL support, so I suspect that this issue may not occur if that patch is in place. Nevertheless, Lustre should handle this issue correctly even on ZFS versions lacking POSIX ACL support.

Comment by Peter Jones [ 27/Feb/14 ]

Lai

Could you please assist with this one?

Thanks

Peter

Comment by Christopher Morrone [ 14/Jun/14 ]

While ZFS now has ACL support, Lustre is still storing the ACL information in xattrs on ZFS. I suspect that the problem has not gone away. See LU-5150.

Comment by Lai Siyao [ 26/Jun/14 ]

The patch is on http://review.whamcloud.com/#/c/10850/.

Comment by Christopher Morrone [ 29/Jul/14 ]

10850 is a patch, but not the fix we need for this ticket.

Comment by Emoly Liu [ 31/Jul/14 ]

Hi Chris,
Lai is on vacation. I think his patch http://review.whamcloud.com/#/c/10895/ for LU-5150 should help with this ticket.

Comment by Peter Jones [ 05/Aug/14 ]

LLNL agree that this should be covered by the LU-5150 fix

Generated at Sat Feb 10 01:44:54 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.