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.

On a shared server (specifically a DreamHost shared server running Debian, but I don't know if this matters) with mod_suexec activated and with PHP and Python forced to use CGI or FastCGI, would you expect Passenger processes to be run as the Apache user or as the user from whose home directory the Passenger-powered app is run?

Please explain the basis for your answer.

(I'm guessing the latter, for consistency with DreamHost's approach to PHP and Python, but I'm vague on how Passenger interacts with Apache, let alone with mod_suexec.)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

mod_suexec is specific to CGI setups, which a completely different technology from passenger.

Passenger implements its own way of user switching. The user applications are run as is determined broadly according to the following:

  1. If we are a Rails app, run as the owner of config/environment.rb. If we are a Rack app, run as the owner of config.ru.
  2. If the determined user would be root, use the configured PassengerDefaultUser
  3. If this still would be root (or unconfigured), run as the user, Apache runs at (e.g. wwwrun or www-data).

For more information, see http://www.modrails.com/documentation/Users%20guide%20Apache.html#user_switching

share|improve this answer

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.