Setup ftp that works with local user with vsftpd on ubuntu

This is the step-by-step installation of vsftpd that actually works. If you have website that runs wordpress, you might want to enable this to be able install/update your wordpress plugin.

Install vsftpd and start the service:

$ sudo apt-get install vsftpd -y
$ sudo systemctl start vsftpd.service
$ sudo systemctl enable vsftpd.service

Open vsftpd.conf file, and make sure these lines below are enabled:

$ sudo vim /etc/vsftpd.conf
...
...
local_enable=YES
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=yes

Restart the service:

$ sudo systemctl restart vsftpd.service

Create local user:

$ sudo useradd ftpuser -s /bin/bash -md /srv/ftpuser
$ sudo passwd ftpuser

Make sure your user format is looks like this:

$ cat /etc/passwd
ftpuser:x:1000:1000::/srv/ftpuser:/bin/bash

Test your ftp user out:

$ ftp example.com

 

Leave a Comment