This tutorial explains how you can lock a user in a chroot jail with vsftpd
. The key option is:
chroot_local_user=YES
This means the user can not leave their home directory. There are multiple ways to create a user. By default, adduser
will prompt you for a password and directory info.
However, you should consider sftp, with openssh-server, instead. There are ways to secure FTP, e.g. tunneling it over SSH or SSL. However, SFTP was originally designed with security in mind.