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!
usermod -g
edits/etc/group
, butinitgroups()
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.