I have a ghost blog installation on Ubuntu 16.04 and while trying to generate a cert for my subdomain with acme.sh which is tied with nginx and my ghost installation through ghost-cli, when I installed my blog it allowed me to auto-generate a certificate automatically for my main domain which I would use on my blog.
I wasn’t able to install acme.sh issuing the following commands:
curl https://get.acme.sh | sh
Output:
Installing to /etc/letsencrypt
cp: cannot create regular file '/etc/letsencrypt/acme.sh': Permission denied
Install failed, can not copy acme.sh
I tried issuing commands and it doesn’t work with sudo (sudo: acme.sh: command not found) or if running as root (bash: acme.sh: command not found.)
And if I run any command without sudo or root it just states permission denied.
/etc/letsencrypt/acme.sh: line 1951: /etc/letsencrypt/mysub.domain.com/mysub.domain.com.conf: Permission denied
/etc/letsencrypt/acme.sh: line 3219: /etc/letsencrypt/ca/acme-v01.api.letsencryp t.org/account.key: Permission denied
cat: /etc/letsencrypt/ca/acme-v01.api.letsencrypt.org/account.key: Permission denied
I installed Certbot, but it has the same issue, permission denied
Any ideas on how I should get this to work? Been at this for several days already because I need my subdomain with HTTPS for a plugin to function.
This seems like a bug with ghost-cli, if anything.
acme.sh does not touch anything in /etc/ unless it is instructed to - its defaults are totally non-privileged: $HOME/.acme.sh/ . I would guess that ghost-cli is nominating another location but not dealing with privilege level properly.
It might be worth cross-posting your question to the Ghost/ghost-cli issue tracker or discussion forum.