-
Notifications
You must be signed in to change notification settings - Fork 308
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
Default folder recreates with root owner #127
Comments
I think docker volumes need to exist before mounting them to avoid having them owned by root. I'm not sure the best way to do that. |
Maybe, unfortunately vagrant doesn't up after I halt them, I will try this, when restore environment. |
+1 If you're using some external auth, you don't know what volumes need to exist. |
@myurasov +1 |
I ended up with passing custom function to |
@myurasov can you please post your code? thanks! |
@pgeez, something like that: import os
import shutil
def format_volume_name(label_template, spawner):
path = label_template.format(username=spawner.escaped_name)
# creates user notebooks dir
if not os.path.isdir(path):
os.makedirs(path)
shutil.chown(path, user='ubuntu', group='ubuntu')
os.chmod(path, 0o755)
return path then in c.DockerSpawner.format_volume_name = format_volume_name |
JupyterHub 0.6.1 is installing on Ubuntu 14.04, using DockerSpawner, custom Authenticator.
Authentication technic: Jupyter opens from another application with temporal code, LoginHandler get code from URL, connects to common application and check code, if success, user authorization is success, so no login form provides.
jupyterhub_configuration.py:
A problem is '/home/jovyan/work' folder belongs to root when new Spawner server created.
If I setting another folder, for example, '/notebooks', then '/notebooks' folder will be under root owner, but '/home/jovyan/work' will owned by jovyan. So it looks like folder automatically recreates by root user.
As a result I can't create any notebooks or files because of insufficient privileges and result is 'permission denied' error.
The text was updated successfully, but these errors were encountered: