vsftpd锁定用户在家目录

1 锁定所有本地用户在家目录:
 更改vsftpd.conf配置文件 添加
 chroot_local_user=YES
2 锁定列表中的用户在家目录
  更改vsftpd.conf 添加
chroot_local_user=NO( 也可不添加 系统默认为no)
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot
将需要锁定的用户一行一个用户名填写到/etc/vsftpd.chroot文件中
3 只有列表中的用户才可以离开家目录
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot
将需要离开家目录的用户一行一个用户名填写到/etc/vsftpd.chroot文件中

下面是英文参考

chroot_list_enable
              If activated, you may provide a list  of  local  users  who  are
              placed  in  a  chroot() jail in their home directory upon login.
              The meaning is slightly different if chroot_local_user is set to
              YES.  In  this  case, the list becomes a list of users which are
              NOT to be placed in a chroot() jail.  By default, the file  con-
              taining  this list is /etc/vsftpd/chroot_list, but you may over-
              ride this with the chroot_list_file setting.

:
              When  enables,  allows use of the SITE CHMOD command. NOTE! This
              only applies to local users. Anonymous users never  get  to  use
              SITE CHMOD.

              Default: YES

chroot_local_user
              If set to YES, local users will be (by default) placed in a chroot() jail in
              their home directory after login.  Warning: This option has security  impli-
              cations,  especially  if  the users have upload permission, or shell access.
              Only enable if you know what you are doing.  Note that these security impli-
              cations  are  not vsftpd specific. They apply to all FTP daemons which offer
              to put local users in chroot() jails.

              Default: NO