Description of problem: Running getattr as non-root user fails with "Operation not permitted". This happens for any attribute, including 'trusted.glusterfs.pathinfo' Version-Release number of selected component (if applicable): glusterfs-fuse-3.3.0-22.el6rhs.x86_64 glusterfs-3.3.0-22.el6rhs.x86_64 glusterfs-server-3.3.0-22.el6rhs.x86_64 glusterfs-rdma-3.3.0-22.el6rhs.x86_64 glusterfs-geo-replication-3.3.0-22.el6rhs.x86_64 How reproducible: 100% mount a gluster filesystem at /gluster/volume1 run through the steps, outlined next Steps to Reproduce: # cd /gluster/volume1 # touch testfile # chmod 644 testfile # setfattr -n trusted.testattr -v testvalue testfile # getfattr -n trusted.testattr testfile # file: testfile trusted.testattr="testvalue" # su - hadoop $ cd /gluster/volume1 $ getfattr -n trusted.testattr testfile testfile: trusted.testattr: Operation not permitted Actual results: fails with: Operation not permitted, and RC=1 Expected results: should display attribute value, and exit RC=0 Additional info:
Actually, 'trusted.*' domain is reserved only for superuser in Linux. Hence getting information about 'trusted' domain key will result in failure as non-root user. Happens even on other filesystems. only issue here is, the error below on xfs is 'ENODATA' and on glusterfs its ENOTSUP ------ Snip ------ [root@tumballi ~]# cd /tmp/ [root@tumballi tmp]# touch abcd [root@tumballi tmp]# chmod 0777 abcd [root@tumballi tmp]# setfattr -n trusted.testing -v value abcd [root@tumballi tmp]# getfattr -n trusted.testing abcd # file: abcd trusted.testing="value" [root@tumballi tmp]# su amar - amar@tumballi:/tmp$ getfattr -n trusted.testing abcd abcd: trusted.testing: No such attribute amar@tumballi:/tmp$ getfattr -d -m . abcd # file: abcd security.selinux="unconfined_u:object_r:user_tmp_t:s0" amar@tumballi:/tmp$ exit [root@tumballi tmp]# getfattr -d -m . abcd # file: abcd security.selinux="unconfined_u:object_r:user_tmp_t:s0" trusted.testing="value" [root@tumballi tmp]# -----