Our PHP application is installed as 'root' on a Redhat5/CentOS system at: /var/www/html/beta/

After disabling SELINUX in order to allow these scripts to execute other programs on the system - http://serverfault.com/questions/192951/what-permissions-are-needed-to-run-a-system-command-within-a-php-script-that-wr

I faced the error that the Apache error_log showed this:

 Cannot write log file 'ffmpeg2pass-0.log' for pass-1 encoding: Permission denied
link|improve this question

71% accept rate
feedback

1 Answer

up vote 1 down vote accepted

The problem was that I had run ffmpeg as root at the same location, which created the 'ffmpeg2pass-0.log' log file.

I had changed permission on /var/www/html/beta to:

- drwxrwxr-x 19 apache apache 12288 Oct 25 08:20 beta

so that apache had appropriate permissions to write to the folder.

However, since I already had the log file at the same location (which had been created as 'root'), user 'apache' was unable to write/append to it! Hence the error message that I saw.

I simply deleted all instances of this file and that worked perfectly!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.