ruby on rails - How to switch user permanently using capistrano -
using capistrano logged default user not have access privilege. need switch different user in remote 'deploy user' perform tasks.
below script
set :user, "sasi" set :group, "sasi" set :switch_user password = capistrano::cli.ui.ask "deployuser password:" run "whoami" run("su - 'deployuser'") |channel, stream, output| channel.send_data("#{password}\n") if output end end
help me in switching different user permanently using capistrano.
i have no idea how capistrano can this. found answer hope you.
permanently switching user in capistrano 3 (separate authorization & deploy)
Comments
Post a Comment