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.

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

1 Answer

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
1  
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
add comment

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.