Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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