本文介绍了文件不可写,即使权限是777的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

东西很奇怪的是怎么回事。

Something really weird is going on.

的httpd.conf 表示运行Apache apache用户。

httpd.conf says apache runs as the apache user.

我有CHOWN-ED文件是阿帕奇:阿帕奇

I have chown-ed the files to be apache:apache.

该文件还没有写。

我已经设置了权限(整个Web根目录的作为最后的手段)为 777 和文件依然没有写...

I have set the permissions (of the entire webroot as a last resort) to be 777 and the file is still not writeable...

的路径是正确的,因为 file_exists()真正,但 is_writeable

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

任何想法?

推荐答案

这是比可能更多,你必须在机器上运行SELinux的。要检查它是否正在运行与否,你应该能够在命令行运行 getenforce 命令。如果返回强制,那么SELinux的已启用并在执行模式下运行。

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.

我建议在大多数情况下(除非你想花几天学习SELinux)的通过运行 setenforce允许性和编辑在/ etc / sysconfig中/ SELinux的,这样在下一次服务器重新启动也不会重新激活它。

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.

如果你确定你不需要SELinux的,你可以只从服务器中删除软件包

If you're sure you don't need SELinux you could just remove the packages from the server

这篇关于文件不可写,即使权限是777的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 23:02