Cap deploy: setup creates a release folder with root privileges

I use capistrano to uninstall my rails application on an Ubuntu server.

I already registered on the server and created the / webapps / myapp folder, but there are no additional folders here.

Then i ran

cap deploy:setup 

There are no errors yet, so I run

 cap deploy:setup 

Now i get this message

 You do not have permissions to write to /webapps/myapp/releases 

I can get around this by logging into the server and changing the owner of the releases, I just wonder why it is not created with the user that I use for deployment? Is this how it works, or am I missing something?

+6
source share
1 answer

In your deploy.rb file, you must specify the deployment user and if he has sudo privileges.

 set :user, "william" set :use_sudo, false 

Granting sudo privileges is not recommended, but this option exists.

The directory you are deploying to should already belong to the william deployment user

+9
source

All Articles