您的位置:首页 > 运维架构 > Linux

Centos7 安装ftp服务躺过的坑

2017-12-18 13:49 736 查看
切记关闭selinux,网上相关说和他有问题的,都是扯淡。1.安装vsftpd
# yum check-update
# yum -y install vsftpd
2.配置参数
# vi /etc/vsftpd/vsftpd.conf
 修改为如下参数
anonymous_enable=NOchroot_local_user=YES--添加如下参数allow_writeable_chroot=YESpasv_enable=YESpasv_min_port=40000pasv_max_port=40100
3.重启ftp
# systemctl restart vsftpd.service# systemctl enable vsftpd.service
4.修改防火墙配置# systemctl start firewalld.service
# firewall-cmd --permanent --add-service=ftp# firewall-cmd --reload
5.为ftp创建一个用户test1(指定目录为/home/www,不允许远程登录shell)
# useradd -d /home/www -m test1 -s /sbin/nologin# cd /home/www# chmod -R 777 *
6.为ftp用户设置一个密码
# passwd test1然后关闭服务器防火墙systemctl disable firewalld.service
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: