Amazon AWS Filezilla 传输权限被拒绝 [英] Amazon AWS Filezilla transfer permission denied
问题描述
我的 Amazon AWS 实例正在运行,测试页面已启动.
I have my instance of the Amazon AWS running, test page is up.
我正在尝试将文件 SFTP 到服务器以显示我的网站.我已将 Filezilla 连接到 AWS 服务器,但是当我尝试将文件从本地计算机移动到/var/www/html 目录时,它显示权限被拒绝.
I am trying to SFTP the files to the server to display my website. I have Filezilla connected to the AWS server but when I try to move the files from my local machine to the /var/www/html directory, it says permission denied.
我刚刚发现我可以将文件移动到/home/ec2-user 目录.所以我猜我的文件在服务器上.但是当我尝试将它们从那里移动到/var/www/html 目录时,它仍然不会移动它们,权限被拒绝.
I just figured out I CAN move the files to the /home/ec2-user directory. So my files are on the server I guess. But when I try to move them from there to the /var/www/html directory, it still won't move them, permission denied.
我已经研究了大约 2 个小时,但我一直无法找到答案.
I've been researching this for approximately 2 hours now but I haven't been able to locate the answer to this.
非常感谢任何帮助,我非常接近!哈哈
Any help is greatly appreciated, i'm so close! Haha
谢谢
更新
推荐答案
允许用户 ec2-user
(Amazon AWS) 对公共 Web 目录 (/var/www/html) 进行写入访问,
通过 Putty 或终端输入此命令,作为 root 用户 sudo
:
To allow user ec2-user
(Amazon AWS) write access to the public web directory (/var/www/html),
enter this command via Putty or Terminal, as the root user sudo
:
chown -R ec2-user /var/www/html
确保对整个文件夹的权限正确:
Make sure permissions on that entire folder were correct:
chmod -R 755 /var/www/html
文档:
使用 Filezilla 和 SFTP(视频)连接到 Amazon EC2 文件目录
这篇关于Amazon AWS Filezilla 传输权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!