I am SSH'ing into a debian server, and to avoid having multiple connections at the same time, I use tmux.
I changed the permissions of a directory (here,
/opt/syncserver), and set the owner to the group and user
The permissions of this directory are equivalent to
chmod, which means
rwxrwx--- (read/write/exec to owner and group).
I then added the main user (that we will call
user1 here) to the group
www-data, because he wasn't in it previously. I then tried to cd into the newly modified directory, without success (
Permission denied error).
Creating a new shell in the same tmux session does not solve the problem either as it should (see the probable duplicate of this question).
I tried launching another SSH session, still with the same user, and had no problem going into the directory.
How can new shells created in a tmux session not take in account the modifications of permissions ? Is there a way to fix this, or am I just completely mistaken and did something wrong at the beginning ?
Creating a new tmux session (with the other one still attached) does not solve the problem either. I guess restarting completely tmux should solve the problem, but I would like to avoid this and to know why does this happen.