Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I'm deploying my ruby on rails app to a fresh ubuntu server that is using Apache & Phusion Passenger.

The only problem I ran into was that I needed to have my production.log file writable by everybody (permissions 666).

I have already changed the file to be owned by www-data (my apache user), but even when this is the case

www-data:www-data 664

It would not work. Phusion complained that it could not write to the log file.

I also noticed that the apache logs are owned by root??

What is going on here?

share|improve this question
up vote 1 down vote accepted

Apache logs are owned by root because they're opened by the master Apache process before it drops privs.

You presumably have phusion running as another user, so now that you've got it working with your logs world-writable, check the running user of the process with ps aux and set the permissions properly from there.

share|improve this answer
As it turns out the actual problem was that my ruby files were checked out as root. Phusion runs as the same user as your buy files UNLESS that user is root. If your files are owned by root, Phusion runs as "nobody", hence the problem. Thanks! – hortitude Oct 11 '09 at 18:14

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.