title: How to enable php to read home directory from apache webroot script
body: <p><strong>This is what I am doing in my script, trying to read files and directory outside web root</strong> </p>
  
  <pre><code>// on line number 17
  echo file_get_contents("/home/admin_cs/Documents/ssh_logs/info_04102015.txt");   
  
  // on line number 34
  $file = scandir("/home/admin_cs/Documents/ssh_logs/");  
  </code></pre>
  
  <p><strong>Errors I received</strong></p>
  
  <blockquote>
    <p>[Fri Sep 04 16:10:00 2015] [error] [client x.x.x.x] PHP Warning: 
    file_get_contents(/home/admin_cs/Documents/ssh_logs/info_04102015.txt):
    failed to open stream: No such file or directory in
    /var/www/html/virtual/Development/Admin/demo_jquery.php on line 17</p>
    
    <p>[Fri Sep 04 16:10:00 2015] [error] [client x.x.x.x] PHP Warning: 
    scandir(/home/admin_cs/Documents/ssh_logs): failed to open dir:
    Permission denied in
    /var/www/html/virtual/Development/Admin/demo_jquery.php on line 34</p>
  </blockquote>
  
  <p><strong>What I attempted</strong></p>
  
  <pre><code>[root@localhost admin_cs]# sestatus 
  SELinux status:                 disabled
  
  [root@localhost admin_cs]# chown -R apache.apache /home/admin_cs/Documents/ssh_logs/
  [root@localhost admin_cs]# chown -R apache.apache /home/admin_cs/Documents/ssh_logs/*
  [root@localhost admin_cs]# chmod o+x /home/admin_cs/Documents/ssh_logs/
  [root@localhost admin_cs]# chmod o+x apache.apache /home/admin_cs/Documents/ssh_logs/*
  </code></pre>
  
  <p>Unfortunately nothing is working, someone help me to fix, I searched and read many posts on this forums, none of them solved my issue, anything else am I missing ? Please help me.</p>