Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question
up vote 6 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.

share|improve this answer
That worked perfectly - don't have to restart my screen session, thanks! – Wayne Werner Mar 12 '11 at 9:10
Good to know. Thanks, eh! – user973810 Jun 2 '14 at 19:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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