How do I set up an FTP user with access to web root using vsftpd?
I am currently setting up a website and I am trying to learn more about web servers on the way. I used shared hosting providers before, but this time I'd like to set up the server from scratch with a VPS. I installed a LAMP stack already and installed Wordpress. Everything works so far except for updating Wordpress automatically since it is asking for FTP access.
Therefore I installed
vsftpd by following this tutorial. This also works accordingly.
The problem is that in the tutorial the FTP user has it's dedicated files directory (
/home/ftp_user/ftp/files), but I need to give the user access to the web root (
/var/www/html/site) for Wordpress performing the update.
I tried having the
local_root point to
and I tried setting up a symlink like this
ln -s /var/www/html /home/ftp_user/ftp/files
but both ways do not work. When I try to connect, it says
vsftpd: refusing to run with writable root inside chroot()
What is the proper way to achieve this? Or would it be better to not use the
/var/www/html location at all?