Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User primary group is not reflected in TLJH terminal #865

Open
deboomce opened this issue Mar 29, 2023 · 2 comments
Open

User primary group is not reflected in TLJH terminal #865

deboomce opened this issue Mar 29, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@deboomce
Copy link

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 deboomce added the bug Something isn't working label Mar 29, 2023
@welcome
Copy link

welcome bot commented Mar 29, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

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! 👋

Welcome to the Jupyter community! 🎉

@minrk
Copy link
Member

minrk commented Mar 30, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants