0

I have a simple problem that has me confused. I'm trying to write to a file using PHP fopen but I'm getting the error

"Warning: fopen(/var/www/********/file.php): failed to open stream: Permission denied in /var/www/********/index.php on line 339 

The file (and directory) that I am trying to write to (file.php) has 777 permissions and is chowned to same user as index.php.

Any ideas what the problem could be?

4

1 回答 1

0

该问题与 SELinux 有关。我需要运行以下命令:

setenforce permissive

文件现在可以毫无问题地写入。

于 2013-06-06T13:12:20.893 回答