I have a weird problem in that my user (on Linux Mint 18.3 Sylvia) is part of group docker, which I verify by starting a terminal:
$ groups
me adm cdrom sudo dip plugdev lpadmin sambashare docker
Now, when I fire up tmux, and run the same command, suddenly my docker membership disappears:
$ tmux
$ groups
me adm cdrom sudo dip plugdev lpadmin sambashare
The weird thing is, when I attempt to forcibly add my user to the group docker when in tmux, it says I'm already in it!
$ sudo adduser me docker
The user `me' is already a member of `docker'.
I'm stumped -- why would being in tmux make a difference? For reference, I use fish shell and this is my .tmux.conf:
$ cat ~/config/.tmux.conf
new-session
set -g default-terminal "screen-256color"
set -g history-limit 10000
setw -g mode-keys vi
set-option -g default-shell /usr/bin/fish
set-option -g default-command /usr/bin/fish
EDIT
When I restarted my computer, everything worked again (both tmux and "normal" shells showed my docker membership). I'm still curious -- why did this happen?
groupsin both shell environments? Have you tried using other commands to show group membership, such as thegetentoridcommands? – igal Mar 15 '18 at 12:34tmux attachinstead? – Andy Dalton Mar 15 '18 at 14:12tmux attach, I just rantmuxand it's not aliased to anything as far as I can tell. – rxmnnxfpvg Mar 15 '18 at 15:11adduserjust edits a file (the/etc/groupsfile. It does not add a process to a group. – ctrl-alt-delor Nov 29 '21 at 17:30