1.安装
sudo apt-get install vsftpd
2.添加ftp用户
sudo adduser ftpuser
3.修改配置
/etc/vsftpd.conf
# 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 #允许登录用户写入
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES # 允许登录用户上传
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES # 允许登录用户创建文件夹
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES # 使用服务器内部时间
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
ftp_username=ftpuser #设置ftp用户
4.登录
ip为服务器局域网ip,端口为21,用户名和密码输入2设置的