1 安装ftp服务
[root@localhost ~]# yum install vsftpdhtml
启动:service vsftpd startlinux
查看状态:systemctl |grep vsftpd服务器
2 编辑vsftpd的配置文件
[root@localhost ~]# vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO #禁止匿名访问
ascii_upload_enable #容许使用ascii码上传
ascii_download_enable #容许使用ascii码下载
userlist_deny=NO #(这条需手动添加到最后)
启动vsftpd服务/etc/init.d/vsftpd start
添加开机自动启动,chkconfig vsftpd onide
chkconfig - - list 是否已经加入了开机启动项阿里云
阿里云下的自动开启加密
systemctl enable vsftpd.servide htm
3 能访问的用户添加
添加用户 upload
useradd upload
添加密码
passwd upload
vi /etc/vsftpd/user_list,将里面其它初始用户所有删除,加入刚刚咱们新建的upload用户,这样子就只有upload能上传。ip
4 linux关闭selinux ci
一、关闭iptablesit
#service iptables stop
二、关闭SELinux
#vi /etc/selinux/config
将文件中的SELINUX="" 为 disabled ,而后重启。
若是不想重启系统,使用命令setenforce 0
reboot重启Linux服务器
reboot
使用FTP登陆查看
输入地址,ftp的帐号和密码
5 如何修改使得全部用户具备上传的权限 文件在/var/www/html 下,能下载,可是不能上传 chmod 777 /var/www/html OK!