jupyter/terminado

Groups in Jupyter terminal are not the same as those of UNIX user

misolietavec opened this issue · 2 comments

I am running Jupyterhub at high school (server OS: antiX = essentially debian/sarge without systemd), where we have the group teachers for teachers. This group is used for access to group-readable shared materials directory.
So, for example for teacher with login name tomas3 :

# groups tomas3
tomas3 : tomas3 teachers

But in terminado terminal, started from Jupyterbub spawned Jupyter server that user has only the base group, tomas3. Of course in Jupyter NB using ! groups we can see all groups. So the ugly solution can be - to go to shared materials directory, download the notebooks here one by one and upload them. That solution I do not like at all... I would be glad if cleaner solution can be found.

Update. The user in troubles was logged in to jupyterhub from yesterday, having only single-user server running, no notebooks. I myself had no problems with my (multiple) groups in terminado. What happens to him, I do not know. I tried also as another teacher-user with no problem. Can we close this issue?

I don't think terminado does anything that should affect this. My guesses would be:

  • If your single user servers run inside docker or something similar, the users and groups inside the container may be different from outside. In this case, though, it would affect all users, and you say it's fine for others.
  • Some things in Unix are inherited from the parent process. So it may be necessary to stop the single user server (or even the whole Jupyterhub, maybe) and start it again for some changes to groups to show up.

Closing for now, let me know if you find a way to consistently reproduce it. You could also try checking it from inside a notebook - if you see the same thing there, it can't be related to terminado.