This question already has an answer here:
I have a directory, under /srv:
drwxrwxr-x 3 minecraft minecraft 4096 Dec 30 06:23 minecraft
Owned by user minecraft, group minecraft. Group has read/write/search permissions. I have a user, shelvacu, that is part of the minecraft group:
$ groups shelvacu shelvacu : shelvacu sudo minecraft
And, as shelvacu, I run
$ mkdir /srv/minecraft/testdir mkdir: cannot create directory ‘/srv/minecraft/testdir’: Permission denied
Why? The minecraft group has write permission on the directory, and shelvacu is part of the minecraft group. What am I missing?