1
votes

I was not able to upload any files in filezilla.. so i changed permission of all files under /var/www/html to ec2-user

I ran this command - chown -R ec2-user /var/app/current

After that Filezilla was working but it burnt the apache.

Now wordpress doesnt create any files in wordpress directory. It says it doesnt have any permission. I guess i killed permission of apache on those files. How can revert back the changes? or atleast how can i give the permissions back as it was?

1

1 Answers

1
votes
  • Add ec2-user to apache group : sudo usermod -a -G apache ec2-user

    Logout and Re-login to instance

    • Change the group ownership of /var/www and its contents to the apache group.

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

    • To add group write permissions and to set the group ID on future subdirectories, change the directory permissions of /var/www and its subdirectories.

    sudo chmod 2775 /var/www find /var/www -type d -exec sudo chmod 2775 {} \;

    • To add group write permissions, recursively change the file permissions of /var/www and its subdirectories:

    find /var/www -type f -exec sudo chmod 0664 {} \;

Pleae Refer to this AWS Documentation