The file is not written, even if the permissions are 777

Something really strange is happening.

httpd.conf says apache works as an apache user.

I have written apache:apache files.

The file is still not writable.

I set the permissions (of the entire web root as a last resort) as 777 and the file is still not being written ...

The path is correct because file_exists() is true , but is_writeable is false .

Any ideas?

+8
filesystems php apache
source share
2 answers

This is more than possible if SELinux is running on the machine. To check if it works or not, you should run the getenforce command on the command line. If it returns "Enforcing", SELinux is turned on and starts in enforcement mode.

I would suggest that in most cases (if you do not want to spend days studying SElinux) you will disable it by running setenforce Permissive and editing /etc/sysconfig/selinux so that the next time the server restarts, it will not reactivate it .

If you are sure that you do not need SELinux, you can simply remove the packages from the server

+13
source share

Perhaps you are only root on vserver? Do you have your own server or you only have a host> If you only have a host (not an entire machine), than often you can not run vmstat or edit the sysctl file.

The second option is SELinux. Run getenforce . If it returns forced execution , you should run setneforce Permissive . This erratic SELinux

0
source share

All Articles