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?
The problem is that if someone can penetrate your system as a user other than yourself, if your files are CHMOD 777, they can read, write, execute and delete them. This is considered a security threat.
Changing File Permissions Using chmod 777 It means to make the file readable, writable and executable by everyone with access.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With