Closed pa5446530a closed 1 year ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
The CHP container doesn't run as root by default, it runs as nobody
. So mounting something 600
means the CHP process probably can't read it by default. You can set the uid of the process with standard docker methods (docker run --user ...
) to the user you want it to be so that it can read your files. The UID and fs permissions you choose to achieve this are up to you.
Bug description
CHP run from Docker image cannot read certificate key with proper permissions.
Expected behaviour
The certificate key is properly read and proxy runs.
Actual behaviour
The proxy startup fails with permission denied on the cert key.
How to reproduce
Have ssl cert keys saved in /etc/ssl/private with proper permissions /etc/ssl:ro is passed into the CHP container Full path to a certificate key located in /etc/ssl/private is passed via
--ssl-key
The key and containing dir have properly set permissions to600
Try to run CHP as standalone container Observe permission error in logsCert key is read fine when CHP is run as part of Jupyterhub in one container.
Your personal set up
Full environment
``` # paste output of `pip freeze` or `conda list` here ```Configuration
docker-compose snippet ``` image: jupyterhub/configurable-http-proxy:4 volumes: - /etc/ssl/:/etc/ssl:ro command: > configurable-http-proxy --port 443 --redirect-port 80 --api-port 8001 --metrics-port 9500 --default-target jhub --ssl-cert /etc/ssl/certs/jhub-domain-cert.pem --ssl-key /etc/ssl/private/jhub-domain-cert.key ```Logs
``` jhub_proxy | node:internal/fs/utils:347 jhub_proxy | throw err; jhub_proxy | ^ jhub_proxy | jhub_proxy | Error: EACCES: permission denied, open '/etc/ssl/private/jhub-domain-cert.key' jhub_proxy | at Object.openSync (node:fs:594:3) jhub_proxy | at Object.readFileSync (node:fs:462:35) jhub_proxy | at Object.