I just setup a VPS and I installed everything I needed and it runs well. Problem is that I want it to be able to update automatically and allow me to install plugins without ftp. This is my setup:
- I created a new user and group named: "wordpress"
- Nginx and PHP-FPM both uses "wordpress" as the user and group.
- I added my own ssh account to the group "wordpress". Lets say my username is "user".
- I changed the ownership of the files to the user "user" and the group "wordpress" including the right permissions (775 for folders and 664 for files, I will try 755/644 later).
- Changed folder group (
chgrp -R) to "wordpress". I also performed "chmod g+s" on the folder so new files belong to the "wordpress" group.
With all of the above I still can't install new plugin (and probably themes or update), but if I change the files owner to "wordpress" all is fine. Is it not possible to have the "user" own the files so incase I upload my files with sftp I don't have to
Is it possible to have WordPress files owned by a user thats in the same group as the group that runs nginx/php-fpm and still be able to install plugins?
nginx.conf at the top contains
user wordpress wordpress and
pool.d/www.conf contains 2 lines with
user = ilyesnl
group = ilyesnl. I also confirmed both processes being run by user