Apache – Fedora file permissions apache no write acces

apachechmodchownfedorapermissions

I spend hours on finding out how to gain file permissions for my apache installation in Fedora 18. I did the following without any luck:

httpd.conf (restarted it afterwards)

DocumentRoot "/var/www/html"

<Directory "/var/www/html/">
    AllowOverride all
    # Allow open access:
    Require all granted
    Options Indexes FollowSymLinks Multiviews
</Directory>

File rights on my /var/www/html folder

drwxrwxrwx. 6 chris apache 4096 26 apr 22:40 .
drwxrwsrwx. 7 chris apache 4096 23 apr 09:30 ..
-rwxrwxrwx. 1 chris apache   19 22 apr 08:37 index.php
-rwxrwxrwx. 1 chris apache   20 21 apr 17:14 info.php
drwxrwxrwx. 8 chris apache 4096 27 apr 14:58 pyro
-rwxrwxrwx. 1 chris apache  125 24 apr 00:36 test.html

As you can see I've even changed the permissions to 777 recursively ( with -R )

I also tried to change user to root and apache, group to user and root etc. In my version I have 2 users: root and chris.

It doesn't matter how I change this.. I still get the PHP error (in for example pyrocms backend):

A PHP Error was encountered

Severity: User Warning
Message: system/cms/cache/default/simplepie/ is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.
Filename: libraries/Simplepie.php
Line Number: 2040

Stil it doesn't seem to be pyrocms because the Laravel framework gives me the same type of error.

Edit
Also User and Group in my httpd.conf are set to apache

Best Answer

I had the same issue because SELinux blocked httpd, it worked fine after this command:

setsebool -P httpd_unified 1

I'm on fedora 23.