They can have permissions to delete files, so long as they have write permissions on the directory the files are inside. Only the owner can change the permissions using normal Unix permissions.
NOTE: If you're a member of a group and the permissions on the file are rwx
, the members of the group can edit the file and execute it, nothing more. The rest of the permissions are keyed off of the directories permissions.
Example
$ groups
saml tmux vboxusers jupiter
# have write perms on dir
$ ls -dl ../somedir/
drwxrwx--- 2 root tmux 4096 May 14 15:36 ../somedir/
$ ls -l
-rw-rw---- 1 root tmux 0 May 14 15:36 somefile
# can delete file
$ rm somefile
$
# don't have write perms on dir
$ ls -ld ../somedir/
drwxr-x--- 2 root tmux 4096 May 14 15:39 ../somedir/
$ ls -l
-rw-rw---- 1 root tmux 0 May 14 15:39 somefile
# can't delete file
$ rm somefile
rm: cannot remove `somefile': Permission denied
# can't move file either
$ mv somefile /tmp/
mv: cannot remove `somefile': Permission denied
Using Access Control Lists (ACLs) you can create more complex and flexible permissions.
References
rm
will usually warn you before deleting a file you don't have write permission for, but that's a UI thing. The underlyingunlink
call doesn't care. – cjm May 14 '13 at 19:23chmod o+t
) on a directory will modify the behavior of world-writable directories (like /tmp); preventing users from removing files they don't own themselves, even though they have write-permission to the directory (and thus should be able to remove any file). But still, it doesn't matter if the user has read and/or write permission to the actual file. – Baard Kopperud May 15 '13 at 6:51