centos系统vsftpd的一些配置

一、检测FTP是否安装:

右击打开终端输入 rpm –q vsftpd

显示 package vsftpd is not installed

说明没有被安装

安装时输入命令:yum install vsftpd

显示fastetst mirror ,security you need to be root to perform this command

说明没有权限

输入su回车,再输密码就可以了

再次运行安装命令yum install vsftpd

安装完毕!

运行命令:

二、配置

命令:

# Vi /etc/vsftpd/vsftpd.conf

把这两句注释去掉

#chroot_list_enable=YES
#chroot_list_file=/etc/vsftpd.chroot_list

在最后一句添加 anon_root=/userFtp/    自定义指定路径

再次输入命令:#Service vsftpd restart       重启vsftpd服务

添加指定文件夹的用户

/usr/sbin/adduser –d /home/logs –g ftp –s /sbin/nologin logs

Passwd logs 修改一下密码

加完用户之后必须要指定用户读写权限

Chmod 755 /home/linger    //755是应该读和写的操作

Chown 用户名:组 /home/linger

三、配置完之后

在windows访问还是访问不了的话,就要看linux的防火墙。第一把防火墙禁用,用图形方式运行命令:setup。进入界面操作。还可以运行命令:/etc/init.d/iptables stop

当然这种方法对服务器来讲不推荐。最好进行图形界面对21端口进行设置,也可以用命令

#/sbin/iptables –I INPUT –p tcp –dport 21 –j ACCEPT

#/etc/rc.d/init.d/iptables save

原文地址:https://www.cnblogs.com/Anders888/p/3317146.html