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