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

Are you facing file uploading errors or not able to install plugins or upload files through ftp to your EC2 installation of WordPress? Possibly folder permissions?? Read on.

I recently setup a new WordPress website on an ec2 instance. I tried to install a plugin by uploading it from admin end but it faced an error, something like, “could not create directory”.

I changed permissions to 755 for folder and 644 for file, and did some more tweaks and it started to work. But then the uploading files through ftp started to fail with bad file permission errors.

Solution:

Here is what I did to fix all WordPress and FTP permission errors to make it
working smoothly.

I assume that apache is the web user and ec2-user is the default ssh/ec2-user for your ec2 instance apache webserver setup

to add ec2-user to apache user group



		


Now run following command to assign appropriate user rights and folder/file permissions



		


It should fix the issues with your wordpress folder permissions on your ec2 installation.

Leave a Reply

Your email address will not be published. Required fields are marked *