PermissionError: [Errno 13] Permission denied: '/home/jovyan/.local'
This is even starting the Deployment as root 0
Note: new-longhorn-volume was remounted to /home/jovyan/volume, in order to start
root@jupyterlab-5fb664fc79-k4scg:~# id
uid=0(root) gid=0(root) groups=0(root)
root@jupyterlab-5fb664fc79-k4scg:~# pwd
/home/jovyan
root@jupyterlab-5fb664fc79-k4scg:~# ls -lh
total 8.0K
drwxr-xr-x 3 root root 4.0K Feb 6 13:32 volume
drwsrwsr-x 2 jovyan users 4.0K Jan 30 03:41 work
What docker image you are using?
jupyter/datascience-notebook
What complete docker command do you run to launch the container (omitting sensitive values)?
docker run -v new-longhorn-volume:/home/jovyan jupyter/datascience-notebook:latest
Hello,
There is already an option documented to handle this case. It is described in the Docker Options section of the documentation.
To fix this kind of problem, you can simply run the notebook with the following options: -e CHOWN_HOME=yes -e CHOWN_HOME_OPTS='-R'.
I have reproduced the case and fixed it successfully by using using this command line.
docker run --user root -v new-longhorn-volume:/home/jovyan \
-e CHOWN_HOME=yes -e CHOWN_HOME_OPTS='-R' \
-it --rm -p 8888:8888 jupyter/datascience-notebook:latest
# Set username to: jovyan
# usermod: no changes
# Changing ownership of /home/jovyan to 1000:100 with options '-R'
# Executing the command: jupyter notebook
Best
To reproduce the case I had to give sudo rights to jovyan thanks to this command.
docker run --user root -v new-longhorn-volume:/home/jovyan \
-e GRANT_SUDO=yes \
-it --rm -p 8888:8888 jupyter/datascience-notebook:latest
THANK YOU VERY MUCH
Most helpful comment
Hello,
There is already an option documented to handle this case. It is described in the Docker Options section of the documentation.
To fix this kind of problem, you can simply run the notebook with the following options:
-e CHOWN_HOME=yes -e CHOWN_HOME_OPTS='-R'.I have reproduced the case and fixed it successfully by using using this command line.
Best
Notes
To reproduce the case I had to give
sudorights tojovyanthanks to this command.