Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 -

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
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


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.