views:

30

answers:

3

What should be the permission on rails app directory on apache server???

+1  A: 

What is your deployment design? Normally you'd use mongrels and apache as a load balancer for them.

So you'd run the mongrels as a user for your site, and all the rails directory should have permissions for that user.

Angelus
+1  A: 

As Angelus said, it depends on your server setup and deployment design. You can use mongrels (or thins, or unicorns, or...) with Apache as a reverse-proxy, but your question leads me to believe you're using Phusion Passenger (aka mod_rails).

If that's the case, the mod_rails site has several very helpful screencasts which you should watch. Generally, though, mod_rails will run as whichever user owns your app's environment.rb file. See the Passenger user switching docs for details on your permission setup.

Josh Lindsey
+1  A: 

You probably have a 'www' or 'apache' user that owns your static content and apache root document directory.

It's common convention to make this user own your rails app as well to preserve the same permissions.

If you use something like capistrano, I think it has builtin recipes for permission structure on top of your release directory after deploying.

Winfield