title: How to give permissions only to PHP to read a config directory outside the web root?
body: <p>I am trying to hide my db conf connection file outside the web root directory of my web server. I want to put it outside and keep the permissions as restrective as possible, in order to permit only the web administrator and the PHP interpreter to read it.</p>
  
  <p>The file has this permissions:</p>
  
  <p>-rw-------  1 serveradmin serveradmin  150 mar 12 01:12 db-conf.php</p>
  
  <p>But when a php script inside the web root calls it using require_once '/path/outside/webroot/to/db-conf.php'; I get the php permission denied error.</p>
  
  <p>**Warning: require_once(/path/outside/webroot/to/db-conf.php): failed to open stream: Permission denied in /var/www/php-script.php on line x</p>
  
  <p>Fatal error: require_once(): Failed opening required '' (include_path='.:') in /var/www/php-script.php on line x**</p>
  
  <p>How can I resolve?</p>