Apache SSL – Recommended Permissions for Directory, Certificate, and Key

apache-2.2file-permissionspermissionsSecurityssl

I have my cert.pem and cert.key files in /etc/apache2/ssl folders.

What would be the most secure permissions and ownership of:

  1. /etc/apache2/ssl directory

  2. /etc/apache2/ssl/cert.pem file

  3. /etc/apache2/ssl/cert.key file

(Ensuring https:// access works of course :).

Thanks,

JP

Best Answer

The directory permissions should be 700, the file permissions on all the files should be 600, and the directory and files should be owned by root.