Amazon Ec2 FTP 写入权限 [英] Amazon Ec2 FTP Write Permission

查看:33
本文介绍了Amazon Ec2 FTP 写入权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够使用 filezilla 成功连接到 amazon ec2 实例.我使用的用户名是 ec2-user.因此,当我尝试将我的应用程序战争转移到 tomcat 时,它说

I am able to successfully connect to amazon ec2 instance using filezilla. The Username i used is ec2-user. So when i try to transfer my application war to tomcat it says

/var/lib/tomcat6/webapps/RealEstateERP.war: open for write: permission denied
 Error: File transfer failed.

我尝试更改权限使用 filezilla,但不允许这样做.我知道没有写权限,但我如何更改它.

I tried to change permission use filezilla but not allowed to do so. I know there is no write permission, but how do i change it.

我是 Linux 新手.请帮帮我.

I ma new to linux. Please help me.

推荐答案

ec2-user 没有权限在/var/lib/tomcat6/webapps/中写入文件.只有 root 用户可以这样做.您有两种方法可以这样做:

The ec2-user don't have permission to write files in /var/lib/tomcat6/webapps/. Only root user can do so. You have two ways here to do so:

1) 使用 filezilla 将文件复制到/home/ec2-user/.现在通过putty SSH 进入linux 机器.使用命令 sudo -s 更改为 root 用户.然后使用命令 cp -i RealEstateERP.war/var/lib/tomcat6/webapps/ 将文件从/home/ec2-user 复制到/var/lib/tomcat6/webapps/.

1) Copy files to /home/ec2-user/ using filezilla. Now SSH into linux machine through putty. Change to root user using command sudo -s. Then copy file from /home/ec2-user to /var/lib/tomcat6/webapps/ using command cp -i RealEstateERP.war /var/lib/tomcat6/webapps/.

2) 通过 putty SSH 到 linux 机器.使用命令 sudo -s 更改为 root 用户.使用命令 为/var/lib/tomcat6/webapps/上的所有用户提供写权限chmod 777/var/lib/tomcat6/webapps/.然后直接从filezilla复制文件到目录.

2) SSH into linux machine through putty.Change to root user using command sudo -s.Provide write permission to all users on /var/lib/tomcat6/webapps/ using command chmod 777 /var/lib/tomcat6/webapps/. Then copy files to directory directly from filezilla.

这篇关于Amazon Ec2 FTP 写入权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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