EC2 - 不能部署为"汇出"用户 [英] EC2 - cannot deploy as "bitnami" user

查看:174
本文介绍了EC2 - 不能部署为"汇出"用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Capistrano的部署一个Rails应用程序到Amazon EC2。 在部署文件,我有以下凭据用于连接到Amazon EC2的:

 设置:用户,汇出
#设置:用户,根
服务器ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com:应用程序,:网页,:DB,:主要=>真正
ssh_options [:密钥] = [/Users/ada/my_amazon_ec2.pem]
 

当我运行帽部署:安装帽部署:检查,我得到如下:

 以下相关性失败。请检查并再试一次:
 - >您没有权限写入到`/ WWW / MyApp的。 (ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com)
 - >您没有权限写入到`/ WWW / MyApp的/版本。 (ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com)
 

是如何可能呢?我能够通过SSH连接到EC2为用户的汇出,但是当我尝试它作为用户的,我得到我应该使用消息汇出用户的登录和关闭连接。

如果我尝试在部署文件,更改修改汇出用户对于,整个部署过程是好的,但后来当我通过SSH登录(如在汇出用户)EC2,我没有看到,应该部署的任何文件,最终的目录就是空的。

什么是错在这种情况下?

感谢你了

解决方案

 须藤CHOWN为-R使用者> <文件夹路​​径>
 

做的伎俩。用户不是文件夹的所有者,因此帽检查被扔错误。

I am using Capistrano for deploying a Rails app to Amazon EC2. In the deploy files, I have following credentials for connecting to Amazon EC2:

set :user, "bitnami"
#set :user, "root"
server "ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com", :app, :web, :db, :primary => true
ssh_options[:keys] = ["/Users/ada/my_amazon_ec2.pem"]

When I run cap deploy:setup and cap deploy:check, I get following:

The following dependencies failed. Please check them and try again:
--> You do not have permissions to write to `/www/myapp'. (ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com)
--> You do not have permissions to write to `/www/myapp/releases'. (ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com)

How's that possible? I am able to connect via SSH to EC2 as the user bitnami, but when I try it as the user root, I get the message that I should use the bitnami user for login and the connection is closed.

If I try to change in the deploy files change the bitnami user for root, the whole deployment process is ok, but then when I log in through SSH (as the bitnami user) to EC2, I don't see any files that should be deployed, the final directory is just empty.

What is wrong in this case?

Thank you so much

解决方案

sudo chown -R <user> <folder path>

did the trick. The user was not the owner of the folder and hence cap check was throwing error.

这篇关于EC2 - 不能部署为&QUOT;汇出&QUOT;用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆