In the default configuration, a local user can switch to a different directory using the CD command after logging in to FTP, which poses a security risk to the system. You can control the user to switch directories by using the following three configuration files.
Chroot_list_enable=yes/no (NO)
Sets whether the user list file specified by the Chroot_list_file configuration item is enabled. The default value is No.
Chroot_list_file=/etc/vsftpd.chroot_list
Lets you specify a user list file that controls which users can switch to the parent directory of the user's home directory.
Chroot_local_user=yes/no (NO)
Lets you specify whether users in the user list file are allowed to switch to the parent directory. The default value is No.
The following effects can be achieved by pairing:
① when Chroot_list_enable=yes,chroot_local_user=yes, users that are listed in the/etc/vsftpd.chroot_list file can switch to a different directory, and users who are not listed in the file You cannot switch to a different directory.
② when Chroot_list_enable=yes,chroot_local_user=no, users listed in the/etc/vsftpd.chroot_list file cannot switch to a different directory, and users who are not listed in the file can switch to a different directory.
③ when Chroot_list_enable=no,chroot_local_user=yes, all users cannot switch to a different directory.
④ when Chroot_list_enable=no,chroot_local_user=no, all users can switch to a different directory.
CentOS FTP user specified directory disabled parent directory