-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Configurable notebook permissions (file based) #2064
Comments
Maybe this is something that would make more sense to do in Jupyterhub? |
I think setting default permissions needs to be done at the FileContentsManager level. I'm happy for an option / different defaults in JupyterHub if that makes sense, but I think the option needs to be exposed somewhere in the single-user code. Unless setting |
I came across issues (with the |
In our case, the checkpoint directories are also a problem. I can take a closer look for a fix in October, if that is ok. |
@chris246 |
I quickly checked the code and found the following piece of code which might be the root cause.
The function |
Sorry for the delay. Afaik umask had to be set for every user, which is not feasible in our environment. I took a closer look on implementing the change in FileContentsManager. My approach:
Open Questions:
|
There's a fix coming in notebook 5.3 to respect umask correctly (#3002). Notebook 5.3 should be released any day now. Once that's out, it sounds to me like the best solution is to add support for setting umask in the relevant Jupyterhub spawners. Adding config to the notebook for default file permissions feels like we're reinventing something that the operating system already provides. |
Ok. Just for clarification/as summary: Notebook 5.3 will respect the current umask setting. Users can modify the notebook configuration to set the desired umask using Python. Setting the umask inside the configuration is an easy solution, that we can also apply in our environment. Thank you for your support! |
That sounds about right. JupyterHub might also gain an official setting to control the umask when starting individual notebook servers (changing it in the notebook config file is a clever trick rather than something we designed). |
Jupyterhub does not start the server till home directory is not set at 757 ? I need to change the home directory /home/{user} permissions from 755 to 757. Is there any other way to fix this issue ? |
Hello, I'm closing this issue as it has had no updates in the last 365 days. Please feel free to reopen this issue if it still needs to be addressed. Thank you! |
For our multi-user setup of Jupyter (using JupyterHub on Debian Linux) we need to grant writing access to the owning group of a Notebook.
Per default, Jupyter creates Notebooks that are writeable only for the creating user (and readable for the group and everyone else).
A possible approach would be to allow the configuration of Unix permissions in the configuration file of Jupyter and evaluate and set those permissions in notebook/notebook/services/contents/fileio.py
Although, this would not cover users using Windows.
What is your opinion on this matter in general and the approach?
The text was updated successfully, but these errors were encountered: