为什么我的Apache进程写信给我的世界可写文件? [英] Why can't my apache process write to my world-writeable file?

查看:197
本文介绍了为什么我的Apache进程写信给我的世界可写文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个问题,我陷入僵局,我会尝试任何事情我已经到了一个死胡同。我的问题是这样的:

I'm having this problem and I reached a deadlock, I would try anything I've reached a deadend. My problem goes like this:

我安装在Fedora 9的机器上运行的Apache2一个Perl / CGI脚本,该脚本有其放在同一个目录中的配置文件,这个配置文件有777权限。

I have a Perl/CGI script installed on Fedora 9 machine running apache2, this script have a config file which placed in the same directory, this config file has 777 permissions.

脚本无法写入文件。它可以读取,但没有办法,我能得到它写它。该文件是由Apache是​​运行相同用户拥有。我写了一个小PHP脚本来测试并把它放在同一个文件夹中。 PHP脚本可以读,但不能写入。

The script can't write to the file. It can read but in no way could I get it to write to it. The file is owned by the same user the apache is running. I wrote a small PHP script to test and placed it in the same folder. The PHP script can read but can't write to it.

我很绝望在这里,我不知道哪里有问题的开始,所以任何帮助让我在正确的道路将是AP preciated。

I'm so desperate here and I don't know where to start with problem, so any help to get me on the right way would be appreciated.

编辑:我可以打开该文件从命令行编辑;这是谁的Apache不能访问它。

I can open the file for editing from command line; it is apache who can't access it

EDIT2:文件夹层次的/ var / WWW / cgi-bin目录/脚本

       权限是这样的

/无功根755

WWW根755

cgi-bin目录根755

脚本阿帕奇755

the folder hierarchy /var/www/cgi-bin/script
permissions are like this
/var root 755
www root 755
cgi-bin root 755
script apache 755

编辑:的问题是SELinux中。我禁用它和脚本有访问的文件感谢大家贡献

在此先感谢

推荐答案

请问Apache加上一些SELinux的运行配置文件或类似的prevents它在该目录中写?

Does apache run with some selinux profile or similar that prevents it writing in that directory?

这篇关于为什么我的Apache进程写信给我的世界可写文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆