I have a directory with the below permissions:
drwxrwsr-x 3 john ro 20K Jun 20 14:48 logs
I logged in as john and touched a new file inside logs:
-rw-r--r-- 1 john ro 0 Jun 20 14:48 d
From my understanding, in this scenario, only john should be able to delete the file d. Any other user with group ro should not be able to delete the file since it has only group read access. However when I try to delete using another account for which ro is the group, the file gets deleted!
mathew@ip-10-0-0-148:/mnt/custom/ops/logs$ ls -lrth d
-rw-r--r-- 1 john ro 0 Jun 20 14:48 d
mathew@ip-10-0-0-148:/mnt/custom/ops/logs$ rm d
rm: remove write-protected regular empty file 'd'? yes
mathew@ip-10-0-0-148:/mnt/custom/ops/logs$ ls -lrth d
ls: cannot access 'd': No such file or directory
This seems strange!. I want group members to be able to read but not delete a file. What am I missing?