We are currently building a jupyterhub environment in a docker container and struggling with shared folders. Our goal is to set up a shared folder which is writable for all users.
In each user's home folder there is a symbolic link ~/shared
to /opt/shared
. The target folder has the permissions 777
and is owned by the group jupyter. Each user is member of the group jupyter. However, if one user creates a file in the shared folder logged in with his account into the web app, the permissions are set to 644
. Therefore, no other user can edit the file.
I've tried to set the umask
to 000
in the /etc/profiles
and the ~/.bashrc
files for each user. However, jupyter seems to ignore it. Is there a possibility to configure jupyter to create new files with g+w
rights as default? I would like to avoid setting up access control lists with setfacl
at the file system level because it requires custom flags in the /etc/fstab
.
Editors are not collaborative by default; to activate it, start JupyterLab with the --collaborative flag. To share a document with other users, you can copy the URL and send it, or you can install a helpful extension called jupyterlab-link-share that might help to share the link including the token.
Built from the jupyter/base-notebook base image. This image contains a single user notebook server for use with JupyterHub. In particular, it is meant to be used with the DockerSpawner class to launch user notebook servers within docker containers.
JupyterLab works out of the box with JupyterHub 1.0+, and can even run side by side with the classic Notebook. When JupyterLab is deployed with JupyterHub it will show additional menu items in the File menu that allow the user to log out or go to the JupyterHub control panel.
chgrp jupyter /opt/shared
chmod g+ws /opt/shared
~/.jupyter/jupyter_notebook_config.py
With following content:
import os os.umask(0o002)
Newly created files will be writable by the group.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With