在/etc/vsftpd/vsftpd.conf中加入以下代码 local_root=/var/www/html #这里是ftp的位置 chroot_local_user=YES #将本地用户锁定在主目录中,不允许切换到上一级目录中