Not able to create any Files/Folders in Jupyter Lab environment

Hello,

I have a Jupyter lab deployment running as a pod on my openshift cluster. I have mounted the persistent volume at path /home/jovyan/work so all the notebooks that are running are present at this path. But, when I try to create any file/folder through any jupyter notebook present in this path, it is trying to create it at ‘/’ which gives permission denied error.

I tried updating the “notebook_dir” path value by updating the jupyter_lab_config.py file by specifying:

c.NotebookApp.notebook_dir = "/home/jovyan/work"

but it didn’t work.

Next, I tried mentioning the value of this field as below since I was running a lab environment:

c.ServerApp.notebook_dir = "/home/jovyan/work"

but this also didn’t worked out.

Then, I tried updating the value of another property in jupyter_lab_config.py file by specifying:

c.ServerApp.root_dir = '/home/jovyan/work'

and, this didn’t worked out as well.

Later, I tried passing the path as a command-line argument as well by passing --notebook-dir='/home/jovyan/work while running the jupyter lab command while startup of the pod but that also didn’t worked out.

I tried adding different combinations of this settings as well but nothing has worked out so far and the instance is still trying to create files/folders at / which is giving me permission denied error.

Can anyone please help me out in resolving this issue as soon as possible as this is really hindering the usage of the jupyter instance for me.

I have mounted the persistent volume

How did you mount the volume? Your permissions have to line up exactly with the uid:guid of the user that’s going to use it: if it’s a stock image from docker-stacks, that would be 1000:100.