SSL_CTX_use_PrivateKey_file error

hi all,

setting up a new server and issued some certs yesterday. when I test a new nginx config, it shows me the following:

[emerg] 31412#31412: SSL_CTX_use_PrivateKey_file("/etc/nginx/certs/andrewshemo.com/key.pem") failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen(’/etc/nginx/certs/andrewshemo.com/key.pem’,‘r’) error:20074002:BIO routines:file_ctrl:system lib error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_file:system lib)

I’m not exactly sure what’s going on here. I issued the certs using acme.sh by following this tutorial: https://mangolassi.it/topic/16704/using-acme-sh-to-generate-wildcard-certificate-with-nginx-and-cloudflare/2

my server is using ubuntu 18.04 and nginx 1.14. any thoughts?

the directory the certs are is in owned by root…

thanks!

That doesn’t seem to be the default location that acme.sh places certs,
Do you run a script that copies them there (or anything related) ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.