linux 下 安装 vsftpd

1.关闭Selinux

sestatus    //查看是否关闭
setenforce 1 //开启selinux
setenforce 0 //关闭selinux

2.vsftpd常用配置

#允许匿名服务器
anonymous_enable=YES

#本地用户允许登录
local_enable=YES 
#本地用户允许上传
write_enable=YES
#本地用户的默认权限
local_umask=022

#用户进入目录时,显示message文件中的信息
dirmessage_enable=YES
#指定信息文件
message_file=./message
#激活日志
xferlog_enable=YES

#主动模式数据
connect_from_port_20=YES
#使用标准的ftp日志格式
xferlog_std_format=YES
#ftp的欢迎信息
ftpd_banner=Welcome to blah FTP service

#允许被监听 默认21端口
listen=Yes
#设置PAM外挂模块提供的认证服务所使用的配置文件名,即 /etc/pam.d/vsftpd
pam_service_name=vsftpd
#用户登录限制
userlist_enable=YES
#是否使用tcp_wrappers作为主机访问控制方式
tcp_wrappers=YES

#启动ftp
service vsftpd start
#查看端口
netstat -tlun

  

猜你喜欢

转载自www.cnblogs.com/xuehaiyiye/p/9085652.html