15
7
Below shows a file, /tmp/testfile
, owned by user1 with group changed to wheel that also includes user2. The file has rw
permission for the group. So shouldn't any member of the group be able to delete it? The example output below shows that user2 is not able to delete the file. Why?
[user2@files ~]$ ls -l /tmp/testfile
-rw-rw-r-- 1 user1 wheel 0 Jul 18 18:54 /tmp/testfile
[user2@files ~]$ groups
user2 wheel
[user2@files ~]$ rm /tmp/testfile
rm: cannot remove `/tmp/testfile': Operation not permitted
2
possible duplicate of Why can't I delete a file where I have group write permissions on?
– Hastur – 2014-07-18T22:52:11.833Furthermore to the complete explanation by @grawity, a good solution is to create your 'own' directory under
tmp
and fix the sticky situation – fcm – 2017-10-12T17:28:38.967