Change home directory of ftp user linux
You have to add the following option on the vsftpd.conf file
chroot_local_user=YES
The documentation inside the configuration file is self-explanatory:
# You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot().
This means, that the user will just have access on the folder you configured as HOME of the user.Below, i have an example of a user passwd entry:
upload_ftp:x:1001:1001::/var/www/sites/:/bin/bash
Edit 1: Set the home directory of the user with the following command
usermod -d /var/www/my.domain.example/ exampleuser