By Samuelgozi
After installing Lets Encrypt, on my LEMP server on CentOS 7, i am unable to restart nginx. The issue seems to be that for some reason I don’t have anymore permissions to the subfolders of /etc/letsencrypt/. not even using sudo the command… i get the error:
/etc/letsencrypt/live/: Permission denied
the permissions are set to:
drwxr-xr-x 8 root root 4096 feb 6 22:27 .
drwxr-xr-x. 86 root root 4096 mar 9 22:11 ..
drwx------ 3 root root 4096 feb 6 22:26 accounts
drwx------ 4 root root 4096 mar 9 22:12 archive
drwxr-xr-x 2 root root 4096 mar 9 22:12 csr
drwx------ 2 root root 4096 mar 9 22:12 keys
drwx------ 4 root root 4096 mar 9 22:12 live
drwxr-xr-x 2 root root 4096 mar 9 22:12 renewal
What should the permissions be? and how should i change them?
Thanks ahead!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Any solution on this? I got the same. Setup a server and everything went well, except this:
$ cd /etc/letsencrypt/live
``
-bash: cd: /etc/letsencrypt/live: Permission denied
So my sites give an error with https
I know it’s been a couple years but I just wanted to mention that I also had this issue. I decided to just give in and go to the root user (easy enough to do…) sudo su - hope you find this helpful!
Hello,
Those permissions seem to match what I have on a fresh setup of let’s Encrypt
drwxr-xr-x 8 root root 4.0K Dec 25 10:18 .
drwxr-xr-x 96 root root 4.0K Jun 7 22:17 ..
drwx------ 4 root root 4.0K Jun 7 22:40 accounts
drwx------ 5 root root 4.0K Jun 7 22:51 archive
drwxr-xr-x 2 root root 4.0K Jun 7 22:51 csr
drwx------ 2 root root 4.0K Jun 7 22:51 keys
drwx------ 5 root root 4.0K Jun 7 22:51 live
drwxr-xr-x 2 root root 4.0K Jun 7 22:51 renewal
So I don’t believe that’s the issue. Where are you getting the permission error? What provided the output you gave with the permission denied?
Have you tried just using root directly, by switching to root with su? Can you run cd /etc/letsencrypt/live and move to the directory while using root or sudo?
Have you confirmed this is the problem with nginx as well? Make sure you have the ssl_certificate and ssl_certificate_key paths set correctly. I imagine it’s an error in the Virtualhost, such as a typo, rather than Letsencrypt.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.