阿里云Centos 7 FTP(vsftp)服务安装及配置

#检查vsftpd是否安装
rpm -qa | grep vsftpd

#检查vsftpd版本并安装
yum list vsftpd
yum install vsftpd

#设置开机启动
systemctl enable vsftpd.service

#启动vsftpd
systemctl status vsftpd.service
systemctl start vsftpd.service
systemctl stop vsftpd.service

#vim /etc/vsftpd/vsftpd.conf
anonymous_enable=YES 变成 anonymous_enable=NO
chroot_local_user=YES前面;去掉 下面添加下行代码
allow_writeable_chroot=YES

#创建FTP账号
useradd -d /home/www/wwwroot/html -s /sbin/nologin h5
#设置h5密码h5123#abc
passwd h5

#设置h5目录权限
chown h5 /home/www/wwwroot/html
chmod -R 755 /home/www/wwwroot/html

#启动vsftpd
systemctl status vsftpd.service
systemctl start vsftpd.service
systemctl stop vsftpd.service

#备注:以上设置好后如果还不可以连接的解决办法如下:
1、systemctl status firewall.service 如果运行请关闭 systemctl stop firewall.service
2、vi /etc/selinux/config 将SELINUX=enforcing改为:SELINUX=disabled
3、登录阿里云管理后台配置21端口开放

  

posted on 2017-11-29 09:26  loveking_阳  阅读(3109)  评论(0编辑  收藏  举报

导航