Something really weird is going on.
httpd.conf says apache runs as the apache user.
I have chown-ed the files to be apache:apache.
The file is still not writeable.
I have set the permissions (of the entire webroot as a last resort) to be 777 and the file is still not writeable…
The path is correct because file_exists() is true but is_writeable is false.
Any ideas?
It’s more than possible that you have SELinux running on the machine. To check whether it’s running or not you should be able to run the
getenforcecommand on the commandline. If it returns “Enforcing” then SELinux is enabled and running in enforcing mode.I’d suggest that in most cases (unless you want to spend days learning about SElinux) that you disable it by running
setenforce Permissiveand editing/etc/sysconfig/selinuxso that next time the server restarts it won’t reactivate it.If you’re sure you don’t need SELinux you could just remove the packages from the server