nginx
letsencrypt
amplify

NGINX Amplify - How to fix "maybe permissions?" error with Let’s Encrypt SSL

More than 1 year has passed since last update.

Symptom

https://amplify.nginx.com/docs/guide-installing-and-managing-nginx-amplify-agent.html
During installing NGINX Amplify agent, the error below

2017-11-20 16:17:33,280 [23305] supervisor ssl certificate found /etc/letsencrypt/live/.ac.jp/fullchain.pem
2017-11-20 16:17:33,280 [23305] supervisor could not read /etc/letsencrypt/live/.ac.jp/fullchain.pem (maybe permissions?)
2017-11-20 16:17:33,287 [23305] supervisor running /usr/sbin/nginx -t -c /etc/nginx/nginx.conf

How to fix

check this

% ls -aslrt
total 44
 4 drwx------    3 root root  4096 May  7  2016 live
 4 drwx------    3 root root  4096 May  7  2016 archive
 4 drwx------    4 root root  4096 Oct 14  2016 accounts
 4 drwx------    2 root root  4096 Oct  1 05:00 keys
 4 drwxr-xr-x    2 root root  4096 Oct  1 05:00 csr
 4 drwxr-xr-x    2 root root  4096 Oct  1 05:00 renewal
 4 drwxr-xr-x    5 root root  4096 Nov  1 11:26 renewal-hooks
 4 drwxr-xr-x    9 root root  4096 Nov  1 11:27 .
12 drwxr-xr-x. 156 root root 12288 Nov 20 10:18 ..

then do

sudo chgrp {username} live
sudo chown {username} live
sudo chgrp {username} archive
sudo chown {username} archive
sudo chgrp {username} accounts
sudo chown {username} accounts
sudo chgrp {username} keys
sudo chown {username} keys

cf.
https://www.digitalocean.com/community/questions/permissions-issue-after-installing-lets-encrypt