一:vsftpd安装
sudo apt-get install vsftpd
二:源码安装
tar -xzvf vsftpd-3.0.3.tar.gz
cd vsftpd-3.0.3
修改builddefs.h
安装依赖
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install libssl1.1
sudo apt install libwrap0-dev
make && make install
二:vsftpd配置
man vsftpd 查看vsftpd
man vsftpd.conf 查看vsftpd.conf配置说明
匿名配置:
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=YES
#
# 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
#
# 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
anon_root=/home/keda/ftp-root
no_anon_password=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_umask=022
日志配置:
#记录服务器上传和下载情况的日志文件.默认值为NO
xferlog_enable=YES
xferlog_std_format=YES
xferlog_file=/var/log/xferlog
dual_log_enable=YES
vsftpd_log_file=/var/log/vsftpd.log
三:启动服务
systemctl stop vsftpd.service
systemctl start vsftpd.service
systemctl restart vsftpd.service
systemctl statues vsftpd.service