I've noticed that when I add myself to a new group with usermod newgroup -g wayne I will have the group listed when I say groups, but if I were to do something such as

sudo mkidr /usr/local/grouptest
sudo chown root:newgroup /usr/local/grouptest
cd /usr/local/grouptest
touch test.txt
touch: cannot touch `test.txt': Permission denied

I get permission denied. When I'm connected across a ssh session, I have to re-connect and then the permissions are in effect for that directory. Is there a way to get around that? Especially since using GNU screen, I would have to kill and re-create all my windows which would be incredibly pesky.

Any help would be greatly appreciated!

link|improve this question

60% accept rate
feedback

1 Answer

up vote 3 down vote accepted

usermod -g edits /etc/group, but initgroups() is only called by /bin/login. That said, newgrp should work to switch to the new group, at the price of starting an extra shell.

link|improve this answer
That worked perfectly - don't have to restart my screen session, thanks! – Wayne Werner Mar 12 '11 at 9:10
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.