cannot open database under Passenger

After switching to passenger from WEBbrick I keep getting "attempt to
write to read-only database", so I chown'd the sqlite file apache.apache
and chmod'd 666, now I get "unable to open database file"?

-MK

After switching to passenger from WEBbrick I keep getting "attempt to
write to read-only database", so I chown'd the sqlite file apache.apache
and chmod'd 666, now I get "unable to open database file"?

What user is passenger set to run your ruby code as ?

Fred

Frederick Cheung wrote:

After switching to passenger from WEBbrick I keep getting "attempt to
write to read-only database", so I chown'd the sqlite file apache.apache
and chmod'd 666, now I get "unable to open database file"?

What user is passenger set to run your ruby code as ?

Fred

Here's the stuff I put in httpd.conf:

LoadModule passenger_module
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
  PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2
  PassengerRuby /usr/local/bin/ruby

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName dev.docsearch.net
    DocumentRoot "/var/www/html/docsearch/public/"
        RailsEnv development
        Alias /filesystem /
</VirtualHost>

Apache runs as "apache".

_MK

By default though the passenger process for a rails app tries to run
as the user which owns conf/environment.rb unless configured otherwise
it runs as the user nobody unless configured otherwise.

http://www.modrails.com/documentation/Users%20guide.html#user_switching
http://www.modrails.com/documentation/Users%20guide.html#PassengerUserSwitching

I think it would be better to use a user with less privilege than root.