0

I am trying to run a php script using the php-cgi. The command is:

sudo -Hu apache /usr/bin/php-cgi -f /var/www/html/load.php >> /var/www/html/load.log

The output is:

-bash: /var/www/html/load.log: Permission denied

when I run ls -la /var/www/html I get:

...
-rwxr--r--  1 apache apache    1 Nov  2 14:00 load.log

apache has rwx permission on that file! why the permission denied?

1 Answer 1

0

I was able to get it working when I add w permissions on the file such as:

`sudo chmod o+w /var/www/html/load.log`

For whatever reason the writing was not being done on behalf of apache.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .