Why can't a user in my group write to this file?

Tony asked:

I have a file on server that can be written by a group. The group is called “deploy” and the user is “mima.” I have verified “mima” is in “deploy” with:

$ id mima
uid=1001(mima) gid=1002(mima) groups=1002(mima),1000(wheel),1001(deploy)

The permissions on the file I want to edit are:

$ ls -l application_helper.rb 
-rw-rw-r-- 1 deploy deploy 460 2012-08-13 21:30 application_helper.rb

This seems like it should work because the group deploy can write and mima is in that group, but I do get a permissions error.

My answer:

Did your user switch to that group with:

newgrp deploy


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.