本篇内容主要讲解“linux中ftp登录不了怎么解决”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“linux中ftp登录不了怎么解决”吧!

方法:1、用“yum -y install vsftpd”安装vsftpd;2、用“chkconfig iptables off”关闭防火墙;3、修改vsftp文件允许root用户登录;4、修改config中disabled模式并重启即可。

本教程操作环境:linux7.3系统、Dell G3电脑。

linux中ftp登录不了怎么办

1、首先安装vsftpd

命令:

yum-yinstallvsftpd

之后开启服务:

servicevsftpdstart

2、关闭防火墙

1) 重启后生效

开启:

chkconfigiptableson

关闭:

chkconfigiptablesoff

2) 即时生效,重启后失效

开启:

serviceiptablesstart

关闭:

serviceiptablesstop

3、默认情况下vsftp是不允许root用户登录的,可以通过修改限制来解决这个问题

首先找到vsftp的配置目录

[root@localhostvsftpd]#pwd
/etc/vsftpd
[root@localhostvsftpd]#ls
chroot_listftpusersuser_listvsftpd.confvsftpd_conf_migrate.sh
[root@localhostvsftpd]#
修改
[root@localhostvsftpd]#catftpusers
#Usersthatarenotallowedtologinviaftp
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
修改
[root@localhostvsftpd]#catuser_list
#vsftpduserlist
#Ifuserlist_deny=NO,onlyallowusersinthisfile
#Ifuserlist_deny=YES(default),neverallowusersinthisfile,and
#donotevenpromptforapassword.
#Notethatthedefaultvsftpdpamconfigalsochecks/etc/vsftpd/ftpusers
#forusersthataredenied.
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

上面这个两个就是默认情况下vsftp不允许使用的账号列表,讲文件中root删除,或者前面加个#号 重启一下vsftpd 服务 即可

4、将/etc/selinux/config 中的enforcing 模式改为disabled, 然后重启

到此,相信大家对“linux中ftp登录不了怎么解决”有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

推荐内容:windows 2008 FTP登录报错

点赞(60) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部