一、只允许某用户登陆 开启ftp服务:编辑/etc/xinetd.d/vsftpd,将服务打开 disable = no,重启xinetd服务 编辑/etc/vsftpd.conf文件,添加: userlist_deny=NO #userlist_deny只允许userlist中的用户访问ftp userlist_enable=YES #开启userlist选项 userlist_file=/etc/user_list #userlist配置文件的位置(如果没有需要新建) 重启服务xinetd服务

二、ftp只允许某用户切换目录 编辑:/etc/vsftpd.conf 开启选项: chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list (没有的话需要新建) 在/etc/vsftpd/chroot_list添加允许的用户 重启xinetd服务