Pankaj Kumar Pankaj Kumar - 1 year ago 85
Linux Question

How do I set write permissions for a directory in AWS for ec2-user?

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.

Answer Source

run this flowing command on terminal.

setenforce 0
nano /etc/sysconfig/selinux