This is my first time trying to set up Wordpress or any site on a cloud hosting. I am on a Ubuntu server, and Wordpress is in the var / www / mydomain / public folder.
I want to achieve this:. Wordpress (PHP) and SFTP users can receive and modify the same files. And Wordpress should be able to do this automatic update for plugins, etc.
This is what I have done so far:
- I have chmodded this folder to 775 to allow group read / write permissions.
- I added the apache user (www-data) and the SFTP user (suser) to group wp.
- I made wp as the owner of the group of all the files inside the wordpress folder.
What works:
- I can edit themes and plugin files using the built-in Word / Wordpress editor.
What does not work:
- Wordpress Update still requests FTP data for update
- When I create a new file with an SFTP user, its permissions will be 644, but they should be 775
What i tried
As far as I understand, the problem lies somewhere with / umask permissions. I know very little about Linux, so this might be a dumb question with a simple solution, but I have no idea how to fix it.
UPDATE: I did not know that I would have to restart the ssh server. I did this using this command /etc/init.d/ssh restart
, and after that the files created using SFTP have 664 permissions (as expected). Also, it seems that Apache also needs to be restarted with this command : /etc/init.d/apache2 restart
However, Wordpress will still not automatically update (it asks for FTP credentials)
source share