- 论坛徽章:
- 0
|
参数:
chroot_local_user 缺省值为NO
关于chroot_local_user的用法,有这样的描述:
1. The powerful option allows the override of any config option specified ini the manual page, on a per-user basis.
2. PLEASE NOTE that not all settings are effective on a per-user basis. For example, many settings only prior to the user's sessions being started, such as, listen_address, banner_file, max_per_ip, max_clients, xferlog_file, etc.
在设置的过程中,想到一个问题,就是能否设置per-user基础上的chroot,就是对于user1限制chroot的操作,对于user2不限制,可以自由变换目录。但是实际操作中,好像实现不了:
(使用系统用户)
如果在主配置文件vsftpd.conf中:
chroot_local_user=NO
user_config_dir=/etc/vsftpd/user_conf
在用户设置文件中:
chroot_local_user=YES
登陆会出现如下错误:
500 OOPS: cannot open config file:/etc/vsftpd/user_conf/nli
Login failed.
421 Service not available, remote server has closed connection
我觉得和文件的权限没有关系,因为我把文件的权限设成777了之后也是这个错误。
反过来设置的话:
vsftpd.conf: chroot_local_user=YES
用户设置文件: chroot_local_user=NO
也是出现同样的错误。
而对于虚拟用户来说,主配置文件vsftpd.conf中的chroot_local_user起决定作用,就是说,不论在用户配置文件中将"chroot_local_user"设置为什么,vsftpd.conf中的值都将决定是否可以限制chroot。
问题是:
1。这样的设置或者想法有现实意义么?
2。在vsftpd中有没有实现的可能?
欢迎讨论。
谢谢。 |
|