1)安装vsftpd:sudo apt-get install vsftpd
2) 检查是否安装了vsftpd ,执行以下命令
vsftpd -version
3)新建文件
mkdir /home/ftp
4)新建FTP用户并设置密码以及工作目录 ftpname为你为该ftp创建的用户名
sudo useradd -d /home/ftp -s /bin/bash ftpname
5)为新建的用户设置密码
passwd ftpname
6)修改vsftpd配置文件
vim /etc/vsftpd.conf
listen=NO listen_ipv6=YES # Allow anonymous FTP? (Disabled by default). anonymous_enable=NO # Uncomment this to allow local users to log in. local_enable=YES # Uncomment this to enable any form of FTP write command. write_enable=YES # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) local_umask=022 # Activate directory messages - messages given to remote users when they # go into a certain directory. dirmessage_enable=YES # #