Nginx – WordPress admin can’t edit files

nginxWordpress

I recently installed wordpress on vps. All theme files' permission are set to 644. The ownership is already given to root. But still wordpress admin can't seem to find "Update file" button in file editor unless I set permissions to 777. Isn't wordpress admin considered as root?

I'm on Centos 6. Also tried follow commands but nothing happened

sudo usermod -aG root $USER
sudo chown -R root:root /var/www/html

What do I do?

screenshot of permissions

Best Answer

You had better hope that WP isn't running as root. :)

You're confusing Wordpress users and system users. They're two completely different things. To grant WP the ability to write files, you need to grant that access to the user that your web application is running as. You are running CentOS, and IIRC web services run as the "nobody" user, though I cannot verify that at this moment.

Related Topic