大漠飞雪 发表于 2013-1-28 22:13:25

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

测试步骤:

1)编写防火墙和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注释#即可。具体如下:
 
# 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服务启停脚本:
 
# ./restart.shFlushing firewall rules: Setting chains to policy ACCEPT: filter Unloading iptables modules: Applying iptables firewall rules: Loading additional iptables modules: ip_conntrack_netbios_ns Shutting down vsftpd: Starting vsftpd for 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>  
 
 
 
 
 
 
页: [1]
查看完整版本: Centos下搭建vsftpd服务(3)---