File permissions changed automatically after server restart

Hello everyone,

I’m not sure if this belongs here, but I’m facing the following problem.
The following information first:

  • JupyterHub (4.1.6)
  • runs on Kubernetes

I created an SSH key, then stopped and restarted the user server.
The File permissions changed automatically after server restart.
-rw-r--r-- became -rw-rw-r--
This means that the user can neither use git pull nor git push.
Because there is an error message:

WARNING: UNPROTECTED PRIVATE KEY FILE!
Permissions 0660 for '/home/jovyan/.ssh/id_ed25519' are too open.

Even if I change the permission of the file, it is set to -rw-rw-r-- after a restart. Unfortunately, I don’t know if it’s JupyterHub, JupyterLab, Kubernetes or something else that’s causing the problem.

I hope you can help me find a starting point.
Thank you very much

changing permissions on start is usually something to do with the volume provisioner in kubernetes, and not something JupyterHub is doing. I have faced this with user volumes on OVH kubernetes. Sometimes you need an init controller to fix permissions after mount before the server starts (as I did here), if there isn’t a configuration option to fix it in the volume provisioner somewhere.

1 Like