Cổng vào tri thức => Tin học => Topic started by: saos@ngmo on 01/07/20, 22:27 Return to Full Version
Title: Adding SFTP User with Correct Permissions for nginx with PHP-FPM
Post by: saos@ngmo on 01/07/20, 22:27
Post by: saos@ngmo on 01/07/20, 22:27
(https://i.imgur.com/sJAWumth.png) (https://i.imgur.com/sJAWumt.png)
When you self-host WordPress on your own VPS like Vultr or Digital Ocean you do not get a default ftp user (besides root). You do not want to use the root user or you will get permission errors. This post shows you how to correct the permission problems if you want to have an SFTP user with nginx and php-fpm.
I am using Debian 9 for this tutorial so I am assuming you are using PHP 7.
Adding SFTP User with Correct Permissions for nginx with PHP-FPM
When you self-host WordPress on your own VPS like Vultr or Digital Ocean you do not get a default ftp user (besides root). You do not want to use the root user or you will get permission errors. This post shows you how to correct the permission problems if you want to have an SFTP user with nginx and php-fpm.
I am using Debian 9 for this tutorial so I am assuming you are using PHP 7.
Adding SFTP User with Correct Permissions for nginx with PHP-FPM
- Create a new user with the right home folder
- ftp user is made member of www-data group
- Configure nginx to run as ftp user
- php-fpm runs as ftpuser and www-data group
- Correct permissions
Create SFTP User