How to change WP file permissions (Unable to update theme due to "permission denied")

December 21, 2018 567 views
WordPress DigitalOcean Ubuntu 16.04


I am trying to update my Genesis theme but I keep getting an error about "inconsistent permissions". So I tried to change permission for themes in my wp-content directory from 644 to 755, but it gives me the following error:

"Failure to write attributes of...
Permission denied. Please contact your hosting service provider"

I know I have to change user permission somehow, but I am not that server savvy to know what to do.

Now, I have updated themes and plugins before many times, but never had this issue. And I know I haven't changed anything recently (except switching to HTTPS from HTTP), so I am lost as to what the issue is.
I would appreciate any help.

Thanks very much in advance.


1 Answer

Hey friend,

Try setting ownership to the web server user. Let's say, for example, that www-data is the web server user and /var/www is your Wordpress directory. In that example, the command would be:

chown -R www-data. /var/www


Have another answer? Share your knowledge.