Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4680

Invalid system.posix_acl_default breaks umask on ZFS MDT

Details

    • 3
    • 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.

      Attachments

        Issue Links

          Activity

            [LU-4680] Invalid system.posix_acl_default breaks umask on ZFS MDT
            pjones Peter Jones added a comment -

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

            pjones Peter Jones added a comment - LLNL agree that this should be covered by the LU-5150 fix
            emoly.liu Emoly Liu added a comment -

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

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

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

            morrone Christopher Morrone (Inactive) added a comment - 10850 is a patch, but not the fix we need for this ticket.
            laisiyao Lai Siyao added a comment - The patch is on http://review.whamcloud.com/#/c/10850/ .

            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.

            morrone Christopher Morrone (Inactive) added a comment - 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 .
            pjones Peter Jones added a comment -

            Lai

            Could you please assist with this one?

            Thanks

            Peter

            pjones Peter Jones added a comment - Lai Could you please assist with this one? Thanks Peter
            nedbass Ned Bass (Inactive) added a comment - - edited

            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.

            nedbass Ned Bass (Inactive) added a comment - - edited 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.

            People

              laisiyao Lai Siyao
              nedbass Ned Bass (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: