1

I want to add my user patrick to the plex group, so I used the command

usermod -a -G plex patrick

Great! When I type groups patrick I get

patrick : patrick adm cdrom sudo dip plugdev lxd sambashare lpadmin plex

However, when I then tried to chgrp a directory from patrick to plex it returns a permission denied! If I type in groups with no username specified, the output returns

patrick adm cdrom sudo dip plugdev lxd sambashare lpadmin

with no group plex at the end. (And I'm logged in as user patrick)

What did I do incorrectly? Why am I seeing different results for groups vs groups username?

1 Answer 1

3

It's in the man page (man groups):

DESCRIPTION

       Print  group  memberships  for  each  USERNAME  or,  if  no USERNAME is
       specified, for the current process (which  may  differ  if  the  groups
       database has changed).

Group membership is set at process creation time (login time). SInce you were not a member of the plex group when you logged in, groups doesn't list it as part of the current process. groups patrick consults the (updated with plex group membership) groups database.

To use the plex group membership, create a new process by logging out and in, or by executing the bash newgrp plex command.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .