I am running WordPress on my VPS using the CentOS 7 LAMP stack. I followed this guide to set permissions, i.e. I ran
sudo chown apache:apache -R * so that my wordpress directory belongs to apache:apache .
I also set the permissions for WordPress files with these commands:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
(I had to prefix the above commands with sudo )
I usually manage the server by logging in via SSH using myuser , where myuser belongs to the apache group and the wheel group.
I have 3 problems:
- Any CRUD command in the WordPress directory still requires me to prefix the
sudo , otherwise I get a permission error. Since myuser owned by apache and apache owns the directory, I am confused about why I still need a command prefix using sudo . - As with issue 1, any
git command, such as git pull , requires me to prefix the sudo , otherwise I get a permission error. - When I try to automatically update theme files from my WordPress toolbar web interface, I get permission errors. Interestingly, I can install / update plugins using the WordPress dashboard without any permissions errors.
Any ideas on what I am missing?
source share