在Amazon EC2上既FileZilla中和Word preSS文件权限 [英] File permission on Amazon EC2 with both Filezilla and Wordpress

查看:232
本文介绍了在Amazon EC2上既FileZilla中和Word preSS文件权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我可以让用户EC2用户(亚马逊AWS)写访问公众
    网页目录(/ var / www / html等):

     须藤CHOWN -R EC2用户在/ var / www / html等

    这允许我使用Filezilla的。


  2. 我可以允许Apache的写访问:

     须藤CHOWN R的阿帕奇:阿帕奇的/ var / www / html等

    这让我对词preSS安装插件,更新等。


我如何设置权限,以便能够一举两得?


解决方案

请尝试以下操作:


  1. 创建一组

  2. 这两个用户添加到该组

  3. 请该集团拥有目录

  4. 更改目录组的权限


 须藤GROUPADD而mygroupsudo的运行gpasswd -a阿帕奇mygroup的
sudo的运行gpasswd -a EC2用户对于mygroup须藤CHOWN R的阿帕奇:对于mygroup的/ var / www / html等须藤搭配chmod -R G + W /无功/ www / html等

  1. I can allow user ec2-user (Amazon AWS) write access to the public web directory (/var/www/html):

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

    which allows me to use Filezilla.

  2. And I can allow apache write access by:

    sudo chown -R apache:apache /var/www/html
    

    which allows me to install plugins, updates, etc on Wordpress.

How can I set the permissions to be able to do both?

解决方案

Try the following:

  1. Create a group
  2. Add both users to that group
  3. Make the group own the directory
  4. Change the directory group permissions


sudo groupadd mygroup

sudo gpasswd -a apache mygroup
sudo gpasswd -a ec2-user mygroup

sudo chown -R apache:mygroup /var/www/html

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

这篇关于在Amazon EC2上既FileZilla中和Word preSS文件权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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