-1

Hi I setup an ssl certificate using godaddy and read the following article: Best location for SSL certificate and private keys on Ubuntu. I am trying to protect an aws ubuntu gitlab instance that uses nginx as a server.

My /etc/ssl/private/ has the following files:

.csr generated on server
.key generated on server
.crt generated by godaddy
.crt BUNDLE generated by godaddy

I have given them the following permissions respectively:

root:root 644
root:ssl-cert 640
root:root 644
root:root 644

Is this correct?

It has been mentioned that this question is the same as What Should be the Permissions of Apache SSL Directory, Certificate, and Key? and my only reason that it is distinct is because it is for nginx NOT apache.

2
  • but this is for nginx not apache
    – Gobi Dasu
    Jun 22, 2016 at 22:24
  • 2
    There's no difference in this regard Jun 23, 2016 at 8:53

1 Answer 1

1

This question is distinct from What Should be the Permissions of Apache SSL Directory, Certificate, and Key? because it is for nginx.

However, following https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md helped me and the answer turned out to be the same as the answer to the apache question What Should be the Permissions of Apache SSL Directory, Certificate, and Key?.

Specifically, I followed the "Enable HTTPS" section which said to do:

sudo mkdir -p /etc/gitlab/ssl
sudo chmod 700 /etc/gitlab/ssl
sudo cp gitlab.example.com.key gitlab.example.com.crt /etc/gitlab/ssl/
sudo ufw allow https

I also made root the owner of the /etc/gitlab/ssl directory and the .crt and .key files inside it, and made the .crt and the .key files' permissions 600, just like the apache answer says.

I don't mind if this question is deleted but first the Apache question's title should be changed to "What Should be the Permissions of Apache/Nginx SSL Directory, Certificate, and Key?"

0

Not the answer you're looking for? Browse other questions tagged .