You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brendon Muir edited this page Nov 25, 2015
·
1 revision
Sometimes you might like your tasks to run as a particular user on your system (different from your deploy user). For example you deploy with the deploy user but the web server runs as www-data and you want your tasks to run as that user so that your environment is as similar as possible to that in which your app runs (files are created with the correct permissions from within the task etc...). Here's how when using Capistrano 3:
Add this to your deploy.rb
set :whenever_command, ->{ [:bundle, :exec, :whenever, '--user www-data'] }
You can add additional command variables there too.