I’ve just installed Ubuntu 24.04 with nginx and certbot, it works without problems, but the test configuration says:
nginx -t
2024/05/04 21:16:57 [warn] 13886#13886: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2024/05/04 21:16:57 [emerg] 13886#13886: cannot load certificate "/etc/letsencrypt/live/xxx.de/fullchain.pem": BIO_new_file() failed (SSL: error:8000000D:system library::Permission denied:calling fopen(/etc/letsencrypt/live/xxx.de/fullchain.pem, r) error:10080002:BIO routines::system lib)
nginx: configuration file /etc/nginx/nginx.conf test failed
-
Why does the warning message appear? I think nginx is running how it should:
root 813 0.0 0.3 21936 7556 ? Ss 15:42 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; www-data 1557 0.0 0.4 23988 8560 ? S 16:01 0:00 nginx: worker process www-data 1558 0.0 0.4 23732 8560 ? S 16:01 0:00 nginx: worker process
-
What about the emerg message?
I think only root can access /etc/letsencrypt/live/xxx.de/fullchain.pem and nginx runs as “www-data”.
Did I do something wrong?
I installed the whole VM new today, I’m sure before there was no warn & emerg message.
before I installed it on 4 days ago with same setup.
Ubuntu 24.04 LTS (GNU/Linux 6.8.0-31-generic x86_64)
Nginx: 1.24.0
I expect no error message at nginx -t
stackunderflow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.