且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AWS EC2 FTP/HTML

更新时间:2022-11-06 21:10:44

首先确保您可以写入文档根目录(在本例中为/var/www/html)EC2 上用户ec2-user"的默认组是ec2-user"&***"

First make sure you can write to the documentroot (/var/www/html in this case) The default groups for user "ec2-user" on EC2 is "ec2-user" & "wheel"

使用以下命令授予用户ec2-user"对/var/www/html 的所有权

Either give user "ec2-user" ownership of /var/www/html with the following command

sudo chown -R ec2-user /var/www/html

或组轮"所有权和写入权限

Or group "wheel" ownership and write permissions

sudo chgrp -R wheel /var/www/html
sudo chmod g+w /var/www/html

第二步是将您的 FTP 客户端(Filezilla、Cyber​​Duck 等)设置为默认为/var/www/html或者在主目录 ec2-user 中创建一个指向 docroot 的符号链接.

Second step is to set your FTP client (Filezilla, CyberDuck, ...) to default to /var/www/html or create a symbolic link in the home directory ec2-user pointing to docroot.

ln -s /var/www/html ~/docroot

当您在 ftp 客户端上进行身份验证时,只需双击看起来像docroot"文件夹的内容.

When you authenicate on your ftp client, just doubleclick on what looks like the "docroot" folder.

一个警告是您的 DocumentRoot 可能未配置为/var/www/html,请检查您在/etc/httpd/conf.d/*.conf 中标记为DocumentRoot"的配置.

One caveat is that your DocumentRoot may not be configured as /var/www/html, please check your configurations in /etc/httpd/conf.d/*.conf labeled with "DocumentRoot".