Question

I'm working on deploying my Rails app with Capistrano and the deploy is failing as it cannot create directory.

I have two users on my server:- root and deploy.

Capistrano is using the deploy user.

I have told Capistrano to deploy the app to /var/rails_apps/

It's /var/rails_apps/ that it cannot create a directory in.

What user should own that folder? root or deploy?

The server has nginx on it so I guess the site will run as www-data which looks to be nginx's user but I'm not sure what other areas should be owned by? Any clarification on this area?

Was it helpful?

Solution

deploy should own that folder. Nginx is just your web server, it is going to proxy requests to your application, which is likely running as a unicorn process (should run as deploy).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top