title: How does Apache access SSL certs created by root user?
body: <p>I have a Debian server on which I am running Apache HTTPD.</p>
  
  <p>I have configured it to use certain SSL certificates which reside in /etc/ssl/private/. Only root user has read-write access to this directory. The HTTPD process is run as www-data user, but it is started using an init.d script (that comes with HTTP installation) by root user.</p>
  
  <p>When apache2 process is running as www-data and the SSL certs can only be read by root user, how is Apache able to read the certs and function without any problem?</p>
  
  <p>I am facing similar problem with an init.d script that I have written for a custom server written in Python. This init.d script was working just fine as long as I was not using SSL certs. As soon as I added these certs, the process just won't start because it won't be able to read the certs as www-data user can't read the certs.</p>
  
  <p>I have used nginx as well in a similar situation and the results were similar as they were with Apache. So how do these two projects tackle this problem?</p>