ptrumpis / snap-camera-server

An alternative, self-hosted solution that allows you to continue using Snap Camera with all Snapchat filters after its shutdown on January 25, 2023.
https://github.com/snapcamera
MIT License
330 stars 40 forks source link

Webproxy doesn't start, due to certificates not being allowed to open with fopen #62

Closed bitnosis closed 1 year ago

bitnosis commented 1 year ago

Describe the bug Starting the webproxy server doesn't work and gives me this error

2023/09/06 21:09:14 [emerg] 1#1: cannot load certificate key "/etc/ssl/private/studio-app.snapchat.com.key": BIO_new_file() failed (SSL: error:80000001:system library::Operation not permitted:calling fopen(/etc/ssl/private/studio-app.snapchat.com.key, r) error:10080002:BIO routines::system lib)
snap-camera-server-311-webproxy-1  | nginx: [emerg] cannot load certificate key "/etc/ssl/private/studio-app.snapchat.com.key": BIO_new_file() failed (SSL: error:80000001:system library::Operation not permitted:calling fopen(/etc/ssl/private/studio-app.snapchat.com.key, r) error:10080002:BIO routines::system lib)

seems to be an ownership error related to nginx?

System (please complete the following information):

bitnosis commented 1 year ago

Output of my ssl folder is....

-rw-r--r--   1 root          staff  1314  6 Sep 14:38 studio-app.snapchat.com.crt
-rw-------   1 root          staff  1704  6 Sep 14:38 studio-app.snapchat.com.key
bitnosis commented 1 year ago
2023-09-06 18:56:18 /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
2023-09-06 18:56:18 /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
2023-09-06 18:56:18 /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
2023-09-06 18:56:19 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
2023-09-06 18:56:19 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
2023-09-06 18:56:19 /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
2023-09-06 18:56:19 /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
2023-09-06 18:56:19 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
2023-09-06 18:56:19 /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
2023-09-06 18:56:19 /docker-entrypoint.sh: Configuration complete; ready for start up
2023-09-06 18:56:19 2023/09/07 01:56:19 [emerg] 1#1: cannot load certificate key "/etc/ssl/private/studio-app.snapchat.com.key": BIO_new_file() failed (SSL: error:80000001:system library::Operation not permitted:calling fopen(/etc/ssl/private/studio-app.snapchat.com.key, r) error:10080002:BIO routines::system lib)
2023-09-06 18:56:19 nginx: [emerg] cannot load certificate key "/etc/ssl/private/studio-app.snapchat.com.key": BIO_new_file() failed (SSL: error:80000001:system library::Operation not permitted:calling fopen(/etc/ssl/private/studio-app.snapchat.com.key, r) error:10080002:BIO routines::system lib)
ptrumpis commented 1 year ago

You probably need to change file ownership with the chown command as described here: https://github.com/ptrumpis/snap-camera-server/discussions/20#discussioncomment-5562425

But with your own user / group

bitnosis commented 1 year ago

Sweet thanks! That worked :)