一台centos7服务器和一台windows均为仅主机模式,可互相通信
实验内容
1.匿名用户登陆,给匿名用户放权,使之可以上传文件
2.使用本地用户验证登录,并限制在家目录内不能随意切换目录
3.设置部分用户可登录或不可登录
4.建立虚拟用户使用FTP
5.给某个特定的虚拟用户配置功能
1.给匿名用户放权
服务器配置
[root@localhost ~]# mount /dev/cdrom /mnt
[root@localhost ~]# rpm -ivh /mnt/Packages/vsftpd-3.0.2-25.el7.x86_64.rpm
准备中... ################################# [100%]
正在升级/安装...
1:vsftpd-3.0.2-25.el7 ################################# [100%]
[root@localhost ~]# iptables -F ##关防火墙
[root@localhost ~]# enforce 0
[root@localhost ~]# systemctl start vsftpd
客户端可以访问了
上传文件受限
在服务器上给匿名用户放权
[root@localhost ~]# vim /etc/vsftpd/vsftpd.conf
...
anonymous_enable=YES
..
write_enable=YES
..
local_umask=022
# When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access
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 ##注释去掉
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
保存退出
查看man手册怎么配
[root@localhost ~]# man vsftpd.conf
anon_mkdir_write_enable
If set to YES, anonymous users will be permitted to create new directories under certain