Capistrano部署权限问题

发布于 2024-10-04 04:19:59 字数 475 浏览 0 评论 0原文

我正在尝试使用 Capistrano 2.5.19 部署我的 Sinatra 应用程序。到目前为止,我成功运行了 deploy:setup,但是当我尝试执行实际部署或检查 (deploy:check) 时,Capistrano 告诉我我不这样做没有权限。我使用 sudo 是因为我使用自己的用户登录,并且用于部署的用户称为 passenger 并且是 www-data 组的成员。因此将 :runner:admin_runner 设置为 passenger。然而,Capistrano 在部署过程中似乎没有使用 sudo,而在设置过程中确实这样做了 (deploy:setup)。这是为什么?我以为是使用runner参数指定的用户来进行部署的。

I'm trying to use Capistrano 2.5.19 to deploy my Sinatra application. So far, I managed to successfully run deploy:setup, but when I try to perform the actual deployment or the check (deploy:check), Capistrano tells me that I don't have permission. I'm using sudo since I log in with my own user and the user used for deployment is called passenger and is member of the group www-data. Therefore is set :runner and :admin_runner to passenger. It seems, however, that Capistrano is not using sudo during the deployment, while it was definitively doing so during the setup (deploy:setup). Why is that? I thought that the user specified by the runner parameter is used for deployment.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只想待在家 2024-10-11 04:19:59

不幸的是,我不能直接回答你的问题,但是,我想提供一个不同的解决方案,那就是花时间正确设置 ssh/rsa 密钥来完成你想做的事情。这将使您不必担心设置和更改用户,也不必担心在 cap 脚本中嵌入身份验证信息。

Unfortunately, I cannot directly answer your questions, however, I would like to offer up a different solution, which is to take the time to properly set up ssh/rsa keys to accomplish what you want to do. This will allow you to both not worry about setting and changing users in addition to not having to worry about embedding authentication information inside your cap scripts.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文