How to solve the problem of unwritable php files

藏色散人
Release: 2023-03-05 06:28:02
Original
3192 people have browsed it

The solution to the unwritable php file: first find and open the "config" file; then set the "SELINUX=""" content in the file to "disabled"; finally execute the command "setenforce 0".

How to solve the problem of unwritable php files

Recommended: "PHP Video Tutorial"

php access file, not writable

In the php code:

<?php
if(is_writeable($file_name))
{
    //....
}
?>
Copy after login

The permission of file_name here has been set to 777. But it is still not writable. According to the information, the problem is SELinux configuration problem. After turning off SELinux, the problem is solved.

The method to shut down SELinux is:

Modify SELINUX="" in the /etc/selinux/config file to disabled

Execute the command: setenforce 0

The above is the detailed content of How to solve the problem of unwritable php files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template