Failure with Let's Encrypt using NextCloud guide

Nothing, after to check your commands nothing. My error is the same on the beginning

steve@Server:~$ netstat -ptan | grep LISTEN | grep nginx
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)

steve@Server:~$ ss -pln | grep nginx

steve@Server:/root# chmod +x /root/permissions.sh && /root/permissions.sh
chmod: cannot access ‘/etc/letsencrypt/live/myid.duckdns.org/fullchain.pem’: No such file or directory
chmod: cannot access ‘/etc/letsencrypt/live/myid.duckdns.org/privkey.pem’: No such file or directory
chmod: cannot access ‘/etc/letsencrypt/live/myid.duckdns.org/chain.pem’: No such file or directory
chmod: cannot access ‘/etc/letsencrypt/live/angus.duckdns.org/cert.pem’: No such file or directory

steve@Server:~$ curl -ikL http://127.0.0.1:81/.well-known/acme-challenge/testHTTP/1.1 403 Forbidden
Server: nginx
Date: Sat, 26 May 2018 10:45:10 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 162
Connection: keep-alive
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: same-origin

403 Forbidden

403 Forbidden


nginx steve@Server:~$ grep 'acme-challenge' /var/log/nginx/le.*.log /var/log/nginx/le.access.log:127.0.0.1 - - [25/May/2018:12:45:10 +0200] "GET /.well-known/acme-challenge/test HTTP/1.1" 403 162 "-" "curl/7.47.0" "-" "127.0.0.1" sn="127.0.0.1" rt=0.000 ua="-" us="-" ut="-" ul="-" cs=- /var/log/nginx/le.error.log:2018/05/25 12:45:10 [error] 6305#6305: *1 open() "/var/www/letsencrypt/.well-known/acme-challenge/test" failed (13: Permission denied), client: 127.0.0.1, server: 127.0.0.1, request: "GET /.well-known/acme-challenge/test HTTP/1.1", host: "127.0.0.1:81"

Hi @SimonLoe,

Above commands should be executed as user root or with sudo from your user.

Seems nginx user doesn't have access to that file (or dirs), could you please show the output of this command (as root):

namei -mo /var/www/letsencrypt/.well-known/acme-challenge/test

Cheers,
sahsanu

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