I'm running WordPress on my VPS with CentOS 7 LAMP stack.I've followed this guide to set permissions, i.e. I've run
sudo chown apache:apache -R *
to ensure that my wordpress directory is owned by apache:apache
.
I've also set WordPress directory and file permissions with these commands:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
(I had to prefix the above commands with sudo
)
Normally I manage the server by logging in through SSH using myuser
, where myuser
belongs to the apache
group and the wheel
group.
I have 3 problems:
- Any file CRUD command in the WordPress directory still requires me to prefix the command with
sudo
, or else I get a permission error. Sincemyuser
belongs toapache
andapache
owns the directory, I'm confused as to why I still need to prefix the commands withsudo
. - Similar to problem 1, any
git
command such as agit pull
requires me to prefix the command withsudo
or else I get a permission error. - When I try to automatically update theme files from my WordPress dashboard web interface, I get permission errors. Interestingly, I'm able to install/update plugins via the WordPress dashboard without any permissions errors.
Any ideas on what I'm missing?