Default Passenger user and permissions
Quick note to self.
If you deploy a Rails application (with Capistrano for instance) to a Passenger / nginx server, you have to make sure you don’t deploy the app as user ‘root’ (I hear people say ‘never ever use root!’ … oh well).
Why not?
Passenger will run your Rails application as the user who owns the config/environment.rb file (see help). If the owner of this file is ‘root’, the user is switched to the default Passenger user, which is by default ‘nobody’.
This might result in insufficient permissions for actions like writing to a database file or when compiling assets.