六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 103|回复: 0

Centos下搭建vsftpd服务(3)---

[复制链接]

升级  30%

3

主题

3

主题

3

主题

童生

Rank: 1

积分
15
 楼主| 发表于 2013-1-28 22:13:25 | 显示全部楼层 |阅读模式
测试步骤:

1)编写防火墙和vsftpd服务启停脚本:
 
[root@localhost vsftpd]# cat restart.sh/etc/rc.d/init.d/iptables stop/etc/rc.d/init.d/iptables startservice vsftpd stopservice vsftpd start 

2)选择上面的修改方法之一,修改配置好文件。

3)当前没有作vsftpd虚拟用户的配置,放开了root用户的登录权限。将/etc/vsftpd/目录下ftpusers   和 user_list  中root注释#即可。具体如下:
 
[root@localhost vsftpd]# cat user_list# vsftpd userlist# If userlist_deny=NO, only allow users in this file# If userlist_deny=YES (default), never allow users in this file, and# do not even prompt for a password.# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers# for users that are denied.#root              注释掉,root用户作为测试bindaemonadmlpsyncshutdownhaltmailnewsuucpoperatorgamesnobody 

4)执行防火墙和vsftpd服务启停脚本:
 
[root@localhost vsftpd]# ./restart.shFlushing firewall rules: [  OK  ]Setting chains to policy ACCEPT: filter [  OK  ]Unloading iptables modules: [  OK  ]Applying iptables firewall rules: [  OK  ]Loading additional iptables modules: ip_conntrack_netbios_ns [  OK  ]Shutting down vsftpd: [  OK  ]Starting vsftpd for vsftpd: [  OK  ][root@localhost vsftpd]#  

5)客户端命令行连接测试:
D:\>ftp 192.168.1.104连接到 192.168.1.104。220 (vsFTPd 2.0.5)用户(192.168.1.104:(none)): root331 Please specify the password.密码:230 Login successful.ftp> ls200 PORT command successful. Consider using PASV.150 Here comes the directory listing.Desktopanaconda-ks.cfginstall.loginstall.log.syslog226 Directory send OK.ftp: 收到 59 字节,用时 0.00秒 59000.00千字节/秒。ftp>  
 
 
 
 
 
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表