I'm running WordPress version 4.7.1 on a few machines (Ubuntu 14.04.5 + Nginx) and want to upgrade to 4.7.3. However when I try to run the updated through WP-Admin it gives:
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
So I thought was some permissions issue, I updated using the following:
find /var/www/site -type f -exec chmod 664 {} \;
find /var/www/site -type d -exec chmod 775 {} \;
chmod 600 /var/www/site/wp-config.php
But that too did not correct the issue – still gives same error.
If I run chown -R www-data:www-data .
it seems to work fine but worried about security…any thoughts?
Best Answer
Reference - Wordpress Codex
Here's a script I run on my webroot to set permissions. This is on my AWS EC instance. I have a little more on permissions here.
My web server user, nginx, is a member of the www-data group