I created a new group and assigned two existing users to that group as follows:
sudo groupadd mygroup sudo adduser user1 mygroup sudo adduser user2 mygroup
Now user1 has a directory called 'code' inside '/home/user1'. This user1 wants to change group ownership of this 'code' directory as follows:
ls -l drwxrwxr-x 2 user1 user1 4096 Oct 10 07:54 code whoami user1 chgrp mygroup code chgrp: changing group of ‘code/’: Operation not permitted failed to change group of ‘code/’ from user1 to mygroup
Any ideas what may be going on here? Is it possible that even though user1 and user2 are members of the 'mygroup' they need something else to be able to assign files/directories to that group?