# Mod\_rails and system users

**URL:** <https://www.ruby-forum.com/t/mod-rails-and-system-users/149155>\
**Category:** Deployment\
**Created:** [September 21, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/mod-rails-and-system-users/149155 "2008-09-21T22:40:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [September 21, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/mod-rails-and-system-users/149155/1 "2008-09-21T22:40:45Z")

</div>

Say you have a server with several apps. Those are your own projects  
in your own machine, not shared hosting.

In Apache + Mongrel I normally had a user account per app, and a vhost  
per app. Mongrels were launched by the corresponding user, so they run  
with his regular permissions. Since Apache talked to the apps through  
mod\_proxy\_balancer everything was fine.

In mod\_rails there’s a single global user, that user is not per vhost.

Would you switch to a single system user and have all the apps in his  
home? Would you base permissions on Unix groups and chmod whatever you  
need? What do you recommend?

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [September 24, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/mod-rails-and-system-users/149155/2 "2008-09-24T17:07:13Z")

</div>

We use mod-rails (passenger) and we followed the guidlines in the  
documentation. it works as follows: apache uses the user account which  
has been given the ownership of environment.rb of the application. so  
you can make an account for each application. also make sure to set the  
propper permissions for the logfiles.  
you can find all of this in detail in de documentation

good luck

remco

Xavier N. wrote:

> Say you have a server with several apps. Those are your own projects  
> in your own machine, not shared hosting.
> 
> In Apache + Mongrel I normally had a user account per app, and a vhost  
> per app. Mongrels were launched by the corresponding user, so they run  
> with his regular permissions. Since Apache talked to the apps through  
> mod\_proxy\_balancer everything was fine.
> 
> In mod\_rails there’s a single global user, that user is not per vhost.
> 
> Would you switch to a single system user and have all the apps in his  
> home? Would you base permissions on Unix groups and chmod whatever you  
> need? What do you recommend?

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [September 24, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/mod-rails-and-system-users/149155/3 "2008-09-24T20:31:11Z")

</div>

On Wed, Sep 24, 2008 at 5:07 PM, Remco Hh  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> you can find all of this in detail in de documentation

Oh you are right, it’s explained here

[http://www.modrails.com/documentation/Users%20guide.html#user\_switching](http://www.modrails.com/documentation/Users%20guide.html#user_switching)
