Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've come into something strange.

I just added a user to the www-data group, the user appears in both /etc/group and /etc/group-, however when I use the groups or id commands the group isn't listed; and the user can't chgrp a file into www-data.

What could be the problem? I'm using a Debian testing machine, never had this kind of problem.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Group membership is only processed on login. You can either:

  • re-login to pick up the new group
  • use newgrp www-data to run a new shell with gid set to www-data
share|improve this answer
    
Thanks a lot; I was closing and opening a new terminal, I though that was enough. –  kevinz Jan 28 '10 at 21:30
1  
Nope, the new terminal is just inheriting the uid/gids from what started it (probably your window manager) –  MikeyB Jan 28 '10 at 22:03
    
I did not see the new groups until I did a su - $USER. login did not work either. –  Jess Apr 5 '13 at 1:43
add comment

Your Answer

 
discard

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.