Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
Since https://review.whamcloud.com/c/fs/lustre-release/+/33996
was merged, chgrp requests from users with read-only permissions started throwing Permission Denied errors.
Reproducer script:
# Create the groups sudo groupadd testGroupA sudo groupadd testGroupB # Create the user and add to groupA sudo useradd -m -g testGroupA testUserA sudo usermod -aG testGroupB testUserA # Create a file owned by testUserA and testGroupA sudo touch /lfs/test/file.txt sudo chown testUserA:testGroupA /lfs/test/file.txt sudo chmod 444 /lfs/test/file.txt # Verify the ownership echo "Initial file ownership:" ls -l /lfs/test/file.txt # Change the group ownership to groupB using chgrp sudo -u testUserA chgrp testGroupB /lfs/test/file.txt # Verify the new ownership echo "Updated file ownership:" ls -l /lfs/test/file.txt
Before:
ubuntu@ip-10-0-159-248:~$ ls -l /lfs/test/file1.txt -r--r--r-- 1 testUserA testGroupA 0 Dec 24 05:16 /lfs/test/file1.txt ubuntu@ip-10-0-159-248:~$ ubuntu@ip-10-0-159-248:~$ # Change the group ownership to groupB using chgrp ubuntu@ip-10-0-159-248:~$ sudo -u testUserA chgrp testGroupB /lfs/test/file1.txt ubuntu@ip-10-0-159-248:~$ ubuntu@ip-10-0-159-248:~$ # Verify the new ownership ubuntu@ip-10-0-159-248:~$ echo "Updated file ownership:" Updated file ownership: ubuntu@ip-10-0-159-248:~$ ls -l /lfs/test/file1.txt -r--r--r-- 1 testUserA testGroupB 0 Dec 24 05:16 /lfs/test/file1.txt
After:
Initial file ownership:
-r--r--r-- 1 testUserA testGroupA 0 Dec 24 05:22 /lfs/test/file.txt
chgrp: changing group of '/lfs/test/file.txt': Permission denied
Updated file ownership:
-r--r--r-- 1 testUserA testGroupA 0 Dec 24 05:22 /lfs/test/file.txt
Script complete.
Also confirmed XFS allows the request with Read-only permissions.
Attachments
Issue Links
- is related to
-
LU-12922 pjdfstest chown_00: POSIX compliance failed on lustre
-
- Open
-