On my Fedora 20, I've learned that to allow write access to files by processes like PHP via Apache, the process owner, which is in my case
apache, must have write permissions to the files. Also, since SELinux is enabled, the files must have the
It also looks like an SELinux policy prevents httpd from accessing any files under
/home. Just about everyone agrees that to remedy this, the files you want accessed must have security context
httpd_user_rw_content_t. I've been sure to do this, yet Apache still says it does not have permission to access the directories. When those files don't have the user_content context, I indeed get SELinux warnings. When the context is set, I don't get the warnings, but Apache still can't access the files. Everything under
/home/me/game has the following user permissions and security context:
$ sudo chcon -Rv --type=httpd_user_rw_content_t game $ sudo setsebool -P httpd_read_user_content 1 $ sudo chown -R :apache game $ ll -Zd game drwxrwxr-x. me apache unconfined_u:object_r:httpd_user_rw_content_t:s0 game
Yet Apache tells me:
You don't have permission to access /game on this server.
Might anyone know what else I could check?