-
Notifications
You must be signed in to change notification settings - Fork 3k
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
unclear fix-permissions setuid, setgid #638
Comments
Yes, I think this should be fine I tried to describe what it's doing and why in the comments at the top of the script. The goal of fix-permissions is to ensure that a given directory is writable by the user, even if the container is run as a uid that's not the default $NB_USER. This is accomplished by making sure everything is readable and writable by the $NB_GID group (aka The first pass sets these permissions explicitly on all files and directories. Up to here, I think the documentation in the script covers it pretty well (feel free to propose clarifications if you think anything is missing / can be better put!). One thing that's missing is why we set setuid/setgid on directories. Essentially, the goal is to make it slightly less likely for files to have the wrong ownership. setgid on a directory sets the default group of new files created in that directory For example, running this as root: mkdir testdir
chown jovyan:users testdir
touch testdir/before
chmod g+s testdir
touch testdir/after
ls -la testdir
You can see that the file Now, this doesn't accomplish a whole lot and what we really want is to use |
Could you explain why should any directory other than the users home directory be writable by that user? Is this something fundamental to the operation of a jupyter notebook? It seems to me that running fix-permissions $CONDA_DIR is both risky and causes container image bloat. Could you explain why this is necessary? |
I second @alshabib's comment. In our case having What's the rational behind making $CONDA_DIR writable by users? Maybe it's just us who have weird use case? |
For me, the last part of fix-permissions is a tad unclear. The how and why isn't documented.
Also, the commit in which it was added is a bit unclear for me.
2df9c49#diff-9916251299bdb9a776a7153e7caad86c
As the first block is using the non-numeric approach, would it be possible to change the second one to do so, too?
Would that be something along the lines of:
?
This may just be me being too new to the permissions management in Linux.
The text was updated successfully, but these errors were encountered: