vsftpd chroot_local_user什么也不做

我正在build立一个vsftpd服务器:

Linux 2.6.32-26-server #48-Ubuntu SMP Wed Nov 24 10:28:32 UTC 2010 x86_64 GNU/Linux 

当我设置chroot_local_user=YES ,没有任何效果(我仍然可以看到/当我login)。 syslog或/var/log/vsftpd.log没有任何内容可以指出什么是错误的。 我知道我正在编辑正确的conf文件,而其他设置在重新启动守护程序时生效,因为这些工作是正常的:

 ssl_enable=YES force_local_data_ssl=YES force_local_logins_ssl=YES 

任何想法有什么不对? 谢谢。

编辑:

我已经touch ed /etc/vsftpd.chroot_list它是空的(没有chroot拒绝的用户),并添加了:

 chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list 

然后重新启动:

 sudo /etc/init.d/vsftpd restart Rather than invoking init scripts through /etc/init.d, use the service(8) utility, eg service vsftpd restart Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the restart(8) utility, eg restart vsftpd vsftpd start/running, process 5606 

仍然没有效果。

如何做到这一点,文档并不十分清楚,如果没有看到你的整个configuration文件,很难判断你错过了什么。

盲目猜测:

  passwd_chroot_enable If enabled, along with chroot_local_user, then a chroot() jail location may be specified on a per-user basis. Each user's jail is derived from their home directory string in /etc/passwd. The occurrence of /./ in the home directory string denotes that the jail is at that particular location in the path. Default: NO 

尝试将其设置为YES。 如果仍然不起作用,请:

  1. 将您的完整configuration文件添加到您的问题
  2. 显示你正在login的用户
  3. 解释你是如何validation你不是chroot的

您可能还需要将local_enabled设置为YES,具体取决于您如何设置帐户。