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 made changes -
            Labels Original: 22i llnl prz topllnl New: llnl prz
            pjones Peter Jones made changes -
            Fix Version/s Original: Lustre 2.7.0 [ 10631 ]
            Resolution New: Duplicate [ 3 ]
            Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
            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
            pjones Peter Jones made changes -
            Labels Original: llnl prz topllnl New: 22i llnl prz topllnl
            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.
            nedbass Ned Bass (Inactive) made changes -
            Link New: This issue is related to LU-5434 [ LU-5434 ]

            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.
            adilger Andreas Dilger made changes -
            Labels Original: llnl topllnl New: llnl prz topllnl
            jlevi Jodi Levi (Inactive) made changes -
            Fix Version/s New: Lustre 2.7.0 [ 10631 ]
            morrone Christopher Morrone (Inactive) made changes -
            Labels Original: topllnl New: llnl topllnl

            People

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

              Dates

                Created:
                Updated:
                Resolved: