2016-10-04 06:51
浏览 253


I have created an instance in AWS with Red Hat Enterprise Linux Server release 7.2 (Maipo) and also install PHP on this server.

I have given permission using this command chown -R apache:ec2-user /var/www/html/ and also give this permission chmod -R 777 /var/www/html/image but folder is not writable this directory /var/www/html/image

Please suggest how can I make the image folder writable.

图片转代码服务由CSDN问答提供 功能建议

我在AWS中使用Red Hat Enterprise Linux Server 7.2(Maipo)创建了一个实例,并在此处安装了PHP 服务器。

我已经使用此命令授予了权限 chown -R apache:ec2-user / var / www / html / 并且还授予此权限< strong> chmod -R 777 / var / www / html / image 但文件夹不可写此目录 / var / www / html / image 请建议如何使图像文件夹可写。

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dougudu3564 2016-10-04 11:49

    run this flowing command on terminal.

    setenforce 0
    nano /etc/sysconfig/selinux
    打赏 评论
  • doutuohan6606 2016-10-04 07:07

    First of all check the directory permission by running the following command on terminal:

    stat -c '%A %a %n' *

    It will give the directory permission like:

    -rw-r--r-- 644 \
    drwxrwxr-x 775 Code Backup
    drwxr-xr-x 755 Desktop
    drwxr-xr-x 755 Documents

    And again try to change the permission by sudo like:

    sudo chown -R apache:ec2-user /var/www/html/ 
    sudo chmod -R 777 /var/www/html/image

    Note: you must have the rights to change the permission, that's why I added sudo (Super User)

    打赏 评论

相关推荐 更多相似问题