在CentOS中,我如何指定user1到目录/ var / www / html和user2到目录/ home / user2,并作为默认user3和所有其他主目录?
我的configuration文件有以下/etc/vsftpd/vsftpd.conf:
# 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(). #chroot_list_enable=YES chroot_local_user=YES # (default follows) #chroot_list_file=/etc/vsftpd/chroot_list
你应该使用虚拟用户设置; 看这里有什么是我的例子。 看一下local_root = / var / ftpserver /或者在pam.d,然后把它改为mysql。 在那里你应该能够消耗目录等等。
您可以访问用户的标准位置内的WEB文件夹 – 通过使用安装本地文件夹
mount --bind
然后使用vsftpd chroot账户。 不要忘记添加条目到fstab