如何为AWS中的ec2-user设置目录的写入权限? [英] How do I set write permissions for a directory in AWS for ec2-user?

查看:373
本文介绍了如何为AWS中的ec2-user设置目录的写入权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Red Hat Enterprise Linux Server 7.2版(Maipo)中的AWS中创建了一个实例,并且还在该服务器上安装了PHP.

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

我已使用此命令授予权限 chown -R apache:ec2-user/var/www/html/,并授予此权限 chmod -R 777/var/www/html/image 但是此目录/var/www/html/image

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.

推荐答案

在终端上运行此命令.

setenforce 0
nano /etc/sysconfig/selinux
SELINUX=disabled

这篇关于如何为AWS中的ec2-user设置目录的写入权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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