Linux FTP服务器配置文件vsftpd.conf 配置
配置文件/etc/vsftpd/vsftpd.conf
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES 开启FTP传输日志, 日志文件:/var/log/xferlog
connect_from_port_20=YES
xferlog_std_format=YES
chroot_user_enable=YES 将用户FTP登录的根目录限制在家目录
chroot_list_enable=YES 若chroot_user_enable=NO时,开启此项,
则只有在chroot_list文件中的用户 FTP登录的根目录限制其家目录
allow_writeable_chroot=YES 当开启限定 FTP登录的根目录限制其家目录时,此项需要打开,
或者将家目录的w权限取消
local_root=/var/ftp/test 统一用户的FTP登录的根目录,看需求是否开启此选项还是上面的选项
listen=NO
listen_ipv6=YES
pam_service_name=vsftpd
tcp_wrappers=YES
use_localtime=YES
reverse_lookup_enable=NO
userlist_enable=YES
userlist_deny=NO
注解#################
vsftpd.conf文件中userlist_enable和userlist_deny组合应用
1.当userlist_enable为NO时,ftpusers文件中的用户将禁止访问FTP服务器。因此ftpusers文件又被称为“禁止使用vsftpd的用户列表文件
2.当userlist_enable为YES,userlist_deny为NO时,FTP服务器仅允许user_list中的用户访问
3.当userlist_enable为YES,userlist_deny为YES时,ftpusers和user_list文件中的用户均不能访问FTP服务器
