linux中ftp登录不了怎么解决

发布时间:2022-05-23 16:35:39 作者:iii
来源:亿速云 阅读:841

本篇内容主要讲解“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 -y install vsftpd

之后开启服务:

service vsftpd start

2、关闭防火墙

1) 重启后生效

开启:

chkconfig iptables on

关闭:

chkconfig iptables off

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

开启:

service iptables start

关闭:

service iptables stop

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

首先找到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

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

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

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

推荐阅读:
  1. windows 2008 FTP登录报错
  2. ftp服务器无法连接登录linux怎么解决

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

linux ftp

上一篇:linux的root权限指什么

下一篇:linux如何设置不允许更改权限

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》