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

attribute not permitted on Lustre versions 2.x

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.9.0
    • Lustre 2.1.0, Lustre 2.2.0, Lustre 2.1.1
    • None
    • MDS Redhat 6 64 bit with Lustre version 2.2
      3 OSSs Redhat 5 64 bit with Lustre version 2.2
      Clients Redhat 5 64 bit with Lustre version 2.2
    • 8361

    Description

      Attribute are not permitted on version 2.x but works on version 1.8.x

      to reproduce the problem

      Lustre clients are mounted with option acl,user_xattr
      wipp-mds2@tcp:/WIPP /mnt/Lustre lustre defaults,acl, 0 0

      #!/bin/bash
      rm -f dummy_file_test_xattr
      touch dummy_file_test_xattr
      chown nobody:nobody dummy_file_test_xattr
      su -s/bin/bash nobody -c "setfacl -m g:bin:rw dummy_file_test_xattr"
      su -s/bin/bash nobody -c "getfacl dummy_file_test_xattr"
      su -s/bin/bash bin -c "setfattr -n user.test.xattr -v 123456 dummy_file_test_xattr"
      su -s/bin/bash bin -c "getfattr -d dummy_file_test_xattr"

      the output
      setfattr: dummy_file_test_xattr: Operation not permitted

      Attachments

        Issue Links

          Activity

            [LU-1482] attribute not permitted on Lustre versions 2.x
            pjones Peter Jones added a comment -

            Landed for 2.9

            pjones Peter Jones added a comment - Landed for 2.9

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21496/
            Subject: LU-1482 mdd: Setting xattr are properly checked with and without ACLs
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 93e459f4d0604cccb31e5cc0a1677499d48fff0b

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21496/ Subject: LU-1482 mdd: Setting xattr are properly checked with and without ACLs Project: fs/lustre-release Branch: master Current Patch Set: Commit: 93e459f4d0604cccb31e5cc0a1677499d48fff0b

            Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/21496
            Subject: LU-1482 mdd: Setting xattr are properly checked with and without ACLs
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 2bd076858bd40532985d7caa1609266a7fe88927

            gerrit Gerrit Updater added a comment - Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/21496 Subject: LU-1482 mdd: Setting xattr are properly checked with and without ACLs Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 2bd076858bd40532985d7caa1609266a7fe88927

            Wang Shilong (wshilong@ddn.com) uploaded a new patch: http://review.whamcloud.com/19258
            Subject: LU-1482 mdd: Setting xattr are properly checked with and without ACLs
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 8d29a17482ed41ef654d538dd3a667834b5dcf37

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@ddn.com) uploaded a new patch: http://review.whamcloud.com/19258 Subject: LU-1482 mdd: Setting xattr are properly checked with and without ACLs Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 8d29a17482ed41ef654d538dd3a667834b5dcf37

            Wang Shilong (wshilong@ddn.com) uploaded a new patch: http://review.whamcloud.com/15959
            Subject: LU-1482 mdd: remove owner rights check for xattr permission
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: cd58efc71705edb7ab96bc64d295d22948312d28

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@ddn.com) uploaded a new patch: http://review.whamcloud.com/15959 Subject: LU-1482 mdd: remove owner rights check for xattr permission Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: cd58efc71705edb7ab96bc64d295d22948312d28
            wangshilong Wang Shilong (Inactive) added a comment - - edited

            I think maybe something like this should fix issue?

            diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c
            index 5938bc9..441c3db 100644
            --- a/lustre/mdd/mdd_object.c
            +++ b/lustre/mdd/mdd_object.c
            @@ -951,8 +951,8 @@ static int mdd_xattr_sanity_check(const struct lu_env *env,
                                !md_capable(uc, CFS_CAP_FOWNER))
                                    RETURN(-EPERM);
                    } else {
            -               if ((uc->uc_fsuid != tmp_la->la_uid) &&
            -                   !md_capable(uc, CFS_CAP_FOWNER))
            +               if (uc->uc_fsuid != tmp_la->la_uid &&
            +                     !md_capable(uc, CFS_CAP_CHOWN))
                                    RETURN(-EPERM);
                    }
            

            We don't need OWNER rights always..

            wangshilong Wang Shilong (Inactive) added a comment - - edited I think maybe something like this should fix issue? diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 5938bc9..441c3db 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -951,8 +951,8 @@ static int mdd_xattr_sanity_check( const struct lu_env *env, !md_capable(uc, CFS_CAP_FOWNER)) RETURN(-EPERM); } else { - if ((uc->uc_fsuid != tmp_la->la_uid) && - !md_capable(uc, CFS_CAP_FOWNER)) + if (uc->uc_fsuid != tmp_la->la_uid && + !md_capable(uc, CFS_CAP_CHOWN)) RETURN(-EPERM); } We don't need OWNER rights always..

            People

              dmiter Dmitry Eremin (Inactive)
              pierrec Pierre Choukroun
              Votes:
              4 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: