title: Internal Server Error 500 mkdir(): Permission denied apache php
body: <p>Apache gives a permission error with php on Centos linux remote server.</p>
  
  <p>I read and tried everything but no luck.</p>
  
  <p>I tried disabling SELinux with setenforce 0;</p>
  
  <p>I tried permissions all 777 and chown -R apache:apache var/www
  chown -R root:apache var/ww</p>
  
  <p>also:
  chcon -R -t httpd_sys_content_t /var/www
  chcon -R -t httpd_sys_content_rw_t /var/www/http/f3</p>
  
  <p>error_log says :</p>
  
  <pre><code>/var/www/html/f3/lib/ErrorHandler.php on line 26
  [Wed Jul 08 14:06:51.744772 2015] [:error] [pid 29288] [client 127.0.0.1:37240] mkdir(): Permission denied
  [Wed Jul 08 14:06:51.745084 2015] [:error] [pid 29288] [client 127.0.0.1:37240] [f3/lib/base.php:2015] Base-&gt;error(500,'mkdir(): Permission denied')
  [Wed Jul 08 14:06:51.745124 2015] [:error] [pid 29288] [client 127.0.0.1:37240] [f3/lib/base.php:2407] mkdir('/f3/tmp/f3filescache/',493,true)
  [Wed Jul 08 14:06:51.745134 2015] [:error] [pid 29288] [client 127.0.0.1:37240] [f3/lib/base.php:340] Cache-&gt;load('folder=/f3/tmp/f3filescache/',true)
  [Wed Jul 08 14:06:51.745141 2015] [:error] [pid 29288] [client 127.0.0.1:37240] [f3/index.php:6] Base-&gt;set('CACHE','folder=/f3/tmp/f3filescache/')
  [Wed Jul 08 14:06:51.746083 2015] [:error] [pid 29288] [client 127.0.0.1:37240] PHP Warning:  file(f3/lib/base.php): failed to open stream: No such file or directory in /var/www/html/f3/lib/ErrorHandler.php on line 26
  </code></pre>
  
  <p>I am desperate and furious.
  Does anyone know what might be wrong?</p>
  
  <p>Thank you.</p>