天天看點

VSFTPD 配置VSFTPD 配置

VSFTPD 配置

Ubuntu中vsftpd的配置檔案為/etc/vsftpd.conf

1. 限制使用者登陸到home路徑下的指定檔案夾

為了指定使用者登入ftp後的路徑,預設的路徑是使用者的home路徑,想要修改下,修改到其home路徑下的ftp路徑中即:/home/username/ftp,在vsftpd.conf中添加下列語句:

user_sub_token=$USER

local_root=/home/$USER/ftp

修改完成後,重新開機服務即可

2. 限制使用者登入ftp後,隻能通路目前路徑,無法通路上層路徑

chroot_local_user=NO

allow_writeable_chroot=YES

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd/vsftpd.chroot_list

chroot_local_user 為NO,chroot_list_enable 為YES表示隻有vsftpd.chroot_list中的使用者受限

chroot_local_user 為YES,chroot_list_enable 為NO  表示所有使用者都受限

chroot_local_user 為YES,chroot_list_enable 為YES表示隻有vsftpd.chroot_list中的使用者都不受限

chroot_local_user 為NO,chroot_list_enable 為NO表示所有使用者都不受限

繼續閱讀