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 getenforce
command 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 Permissive
and editing /etc/sysconfig/selinux
so 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
Maybe you are root on vserver only?
Do you have own server or do you have only host>
If you have only host (not whole machine) than often you can't run vmstat or edit file of sysctl .
Second option is SELinux. Run getenforce. If it returns enforcing than you should run setneforce Permissive. This dissable SELinux