ftp無(wú)法連接登錄linux的解決方法

ftp無(wú)法連接登錄linux的解決方法

1、首先安裝vsftpd

命令:

yum?-y?install?vsftpd

之后開啟服務(wù):

service?vsftpd?start

2、關(guān)閉防火墻

1) 重啟后生效?

開啟:

chkconfig?iptables?on

關(guān)閉:

chkconfig?iptables?off

2) 即時(shí)生效,重啟后失效?

開啟:

service?iptables?start

關(guān)閉:

service?iptables?stop

3、默認(rèn)情況下vsftp是不允許root用戶登錄的,可以通過修改限制來(lái)解決這個(gè)問題

首先找到vsftp的配置目錄 [root@localhost?vsftpd]#?pwd /etc/vsftpd [root@localhost?vsftpd]#?ls chroot_list??ftpusers??user_list??vsftpd.conf??vsftpd_conf_migrate.sh [root@localhost?vsftpd]#  修改 [root@localhost?vsftpd]#?cat?ftpusers #?Users?that?are?not?allowed?to?login?via?ftp #root bin daemon adm lp sync shutdown halt mail news uucp operator games nobody  修改 [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 bin daemon adm lp sync shutdown halt mail news uucp operator games nobody  上面這個(gè)兩個(gè)就是默認(rèn)情況下vsftp不允許使用的賬號(hào)列表,講文件中root刪除,或者前面加個(gè)#號(hào)?重啟一下vsftpd?服務(wù)?即可

4、將/etc/selinux/config 中的enforcing 模式改為disabled, 然后重啟

推薦教程:Linux教程

以上就是ftp無(wú)法連接登錄

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點(diǎn)贊13 分享