0

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 ?

Lexib0y
  • 227
  • 3
  • 14

1 Answers1

2

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

Kamil J
  • 1,632
  • 1
  • 5
  • 10