CentOS 7 FTP服务搭建
本项目使用VSFTPD配置FTP服务器,实现以下功能:
- 开放实体用户登陆。使用者登陆FTP的时候显示欢迎消息;系统帐号不允许登陆;允许实体用户进行上传、下载、建立目录及修改文件;设置用户新建文件、目录的umask为002。
- 仅允许匿名登陆。匿名登陆时显示欢迎消息;仅开放anonymous登陆,且不需要密码;限制文件转输速度为30KB/s;文件连接过程超过60秒没有回应就断开连接;anonymous超过10分钟没有动作就断线;最大同时上线人数限制为50人,同一IP的最大连线数为5。
实验环境准备
服务器:Centos 7
客户端:window2003
selinux: 关闭
ps:最坏情况下可以选择selinux对FTP不做任何限制
setsebool -P ftpd_connect_all_unreserved 1
1. 安装vsFTP
yum -y install vsftpd
2. 配置VSFTP文件
打开vsftpd的配置文件
vi /etc/vsftpd/vsftpd.conf
8 # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
9 # capabilities.
10 #
11 # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
12 anonymous_enable=NO //禁止匿名登陆
13 #
14 # Uncomment this to allow local users to log in.
15 # When SELinux is enforcing check for SE bool ftp_home_dir
16 local_enable=YES
17 #
18 # Uncomment this to enable any form of FTP write command.
19 write_enable=YES
20 #
21 # Default umask for local users is 077. You may wish to change this to 022,
22 # if your users expect


3214

被折叠的 条评论
为什么被折叠?



