the-littlest-jupyterhub icon indicating copy to clipboard operation
the-littlest-jupyterhub copied to clipboard

User primary group is not reflected in TLJH terminal

Open deboomce opened this issue 2 years ago • 2 comments

Bug description

New TLJH users are added to the jupyterhub-users group, but also to a new group equal to their username (e.g. jupyter-x). When user jupyter-x creates a new file in the TLJH terminal, it is created with the jupyter-x primary group.

I tried to change the primary group as follows: sudo usermod -g jupyterhub-users jupyter-x In the TLJH terminal, running id still shows jupyter-x as primary group, which is not intended. Even when logging out and stopping all terminal processes, id still shows jupyter-x as primary group.

However, in a regular terminal window, id shows jupyterhub-users as primary group, as intended. Also, the /etc/passwd file shows the correct primary group ID.

Expected behaviour

sudo usermod -g jupyterhub-users jupyter-x should change the user's primary group in the TLJH terminal. id shows jupyterhub-users as primary group. New files and folders are created with jupyterhub-users as group.

Actual behaviour

id still shows jupyter-x as primary group. New files and folders are created with jupyter-x as group.

Specs

  • OS: Ubuntu 22.04 TLS

deboomce avatar Mar 29 '23 17:03 deboomce

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

welcome[bot] avatar Mar 29 '23 17:03 welcome[bot]

This is presumably something in how Systemdspawner creates the systemd unit to launch 'as the user'. Just to check: you have restarted the server for the modified user after making this change? It's the server process properties that really affect everything from terminals to kernels, since those are subprocesses that launch without changing any uid or gid.

minrk avatar Mar 30 '23 08:03 minrk