WordPress and plugins can't update ("inconsistent file permissions" error)?

I have a problem - when I click on "Wordpress update", I receive this message:

Downloading update from https://downloads.wordpress.org/release/wordpress-5.1-new-bundled.zip… Unpacking the update… The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php Installation Failed

I changed permissions: WP-admin and WP-includes to 755 WP-content to 777 All files in WP-admin are 755.

What can be the problem? I am trying to solve it, but I can't do it.

Topic filesystem permissions updates Wordpress

Category Web


I had the same problem. I used following command on Centos8:

sudo setenforce 0

After that I could upgrade Wordpress.


User SSH, cd into your website root directory, and run:

sudo chmod 2775 . && sudo chown -R ec2-user:apache . && sudo find . -type d -exec chmod g=rwxs "{}" \; && sudo find . -type f -exec chmod g=rw  "{}" \; && sudo setfacl -d -m g::rwx . && sudo setfacl -d -m o::rx .

Make sure to change ec2-user:apache to your user:group.

This will make all directories and sub-directories and any new files copied to them have the same permissions.


Make sure that your server is running as the user who owns the folder


Try to run these commands (Commands are for both Dashboard and ftp)

sudo usermod -aG www-data $USER

sudo chown -R www-data:www-data /var/www

sudo chmod -R 774 /var/www

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.