On Wed, Jun 10, 2009 at 7:49 PM, Mk 27<rails-mailing-l...@andreas-s.net> wrote:
>
> Frederick Cheung wrote:
>> On Jun 10, 11:06�pm, Mk 27 <rails-mailing-l...@andreas-s.net> 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".

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

-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to