MKumar
MKumar

Reputation: 1524

Rails application permission on apache

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

Upvotes: 1

Views: 803

Answers (4)

Sandip Karanjekar
Sandip Karanjekar

Reputation: 850

While installing apache it creates www-data group and owner so you have to give the ownership of this user for your application. Then restart the apache service. rails application works fine.

Upvotes: 0

Winfield
Winfield

Reputation: 19145

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.

Upvotes: 1

Josh Lindsey
Josh Lindsey

Reputation: 8803

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.

Upvotes: 1

Draiken
Draiken

Reputation: 3815

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.

Upvotes: 2

Related Questions