Setting up permissions for WordPress on Amazon EC2 (Amazon Linux)

后端 未结 5 1136
遥遥无期
遥遥无期 2021-02-01 09:55

I setup WordPress on an Amazon EC2 instance. It\'s using Amazon Linux and is a standard setup (just php5 and mysql).

WordPress works fine, but there\'s some permission i

5条回答
  •  感情败类
    2021-02-01 10:15

    I tried the solution provided in the answer by @markratledge for my AWS EC2 instance (Amazon Linux).

    Wordpress(apache) was good, but SFTP(ec2-user) was giving permission errors.

    Then I tried the following:

    I added ec2-user to the apache group:

    usermod -a -G apache ec2-user
    

    Next I set 'apache' as owner group and 'ec2-user' as owner user for the WordPress installation directory (/var/www/html in my case):

    chown -R apache:ec2-user /var/www/html
    

    Finally, WordPress was happy and I could SFTP too. Thanks!

提交回复
热议问题