I have a centos 7 file server and user that can work on shared directory are in group users. With default umask a user is able to create file with the following permissions:
[luca@myserver mydirectory]$ ls -l testfile -rw-rw-r-- 1 luca users 0 18 giu 13.03 testfile.txt
but when an other user, part of the same group users, try to change permissions on the same file I have
[nick@myserver mydirectory]$ chmod a+x testfile.txt chmod: cambio dei permessi di "testfile.txt": Operazione non permessa (change permissions: operation not permitted, sorry for italian)
Why an other user in the same group cannot change file permission for a file that have write permission for user in the same group?
The common rwx permissions only applies to file content. File attributes, like ownership and permissions can only be changed by the file owner or root.
So if testfile.txt belongs to luca, whatever are the permissions of nick regarding this file, he will be not able to change its permissions.