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

Locally, my app runs fine on and writes to it's logs.

My production server is running CentOS with an Apache server running Passenger. When trying to debug, I noticed my log files were not being written to. First thing I did was chmod 0666 them, and when I found out that didn't work I looked at my apache log. I found this:

Rails Error: Unable to access log file. Please ensure that /var/www/vhosts/ exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

(Note: I am deploying with capistrano)

Anyway, I googled around and found people saying it's an SELinux issue, so I looked on passenger's doc's and found this:

which basically says do this: chcon -R -h -t httpd_sys_content_t /path/to/your/rails/app

However, when I fill in the proper path I get: Operation not supported.

Pretty stumped...any ideas?

share|improve this question

Check out using top which user the passenger processes are run as. IIRC it won't necessarily be the www-data/apache user.

share|improve this answer
ps aux | grep passenger might be simpler to interpret – LapTop006 Jan 2 '10 at 14:13

I have no experience with passenger specifically, but one thing you may want to check is to make sure that the user running apache (or whatever daemon is responsible for writing to the log files) has the needed permissions to cd through that entire file path you gave.

share|improve this answer

Your Answer


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