Self-mockery : Fantastic question.

I followed sudo usermod -a -G grp uzr in order to add uzr into grp.

When I type groups uzr I get uzr : adm cdrom ... grp and when I'm logged in with uzr I type groups and I get adm cdrom ....

But no mention of grp anymore.

I'm trying to add an user into www-data in order to WinSCP and on-the-fly edit my files with a Windows based IDE.

Neither problem with the Fuse-based stack environment, nor with WinSCP, because, when I'm logged in with uzr, mv doesn't works on files, because, of course, rights do not permit w flag but to group www-data.

I'm stuck with it. Probably a new behaviour I'm not aware of ?

  • Did you log out and log back in? Dec 5 '18 at 20:37
  • not at all, thank you. Then I guess that rights are passed to the shell where I log. Not, to the user object at each filesystem request. Cool. Dec 6 '18 at 7:57

The group membership is set up with login. Once the session is running the group membership is not refreshing.... You need to do fresh new login as user uzr to see the group membership.

uzr (1) => sudo to root / root session (2) => exit (2) and return to (1)

The most probably you have been logged in as uzr (session 1), then sudo to root (you have kump to session 2). Here you have added user uzr to group grp and using group uzr you have checked the setting which will be applied to new session of user uzr. Once you have terminate root session (2) you have return to original (1) session of user uzr which has been started before you have add user to new group so running group will show you group membership of current (1) session. Once you will do new login of user uzr the group membership will be set up properly...

So solution (to see the membership) do one of following steps:

  • end the current session and login again as user usr

  • make new session e.g. sudo su - uzr which will start new session

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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