I was wondering about the following behavior:I have three users A, B and C. A creates a folder and changes the group ownership to C's group.mkdir foldchgrp C foldchmod g+rw foldNow I add B to the C user group byusermod -a -G C Band id B gives me uid=1002(B) gid=1002(B) groups=1002(B),1003(C). Trying to change the content of fold (mkdir fold/fold2 or touch fold/test) as user B however gives me a permission denied and only A and  C can change contents of that folder. What is the reason? If I change the gid of B to C by  usermod -g C B, but this can't be the proper way right?
What is difference betwen gid and groups
permissions;files