Centos上搭建vsftpd服务(3)- 测试
Centos下搭建vsftpd服务(3)---- 测试
测试步骤:
1)编写防火墙和vsftpd服务启停脚本:
[root@localhost vsftpd]# cat restart.sh /etc/rc.d/init.d/iptables stop /etc/rc.d/init.d/iptables start service vsftpd stop service 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用户作为测试 bin daemon adm lp sync shutdown halt mail news uucp operator games nobody
4)执行防火墙和vsftpd服务启停脚本:
[root@localhost vsftpd]# ./restart.sh Flushing 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)): root 331 Please specify the password. 密码: 230 Login successful. ftp> ls 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. Desktop anaconda-ks.cfg install.log install.log.syslog 226 Directory send OK. ftp: 收到 59 字节,用时 0.00秒 59000.00千字节/秒。 ftp>