Linux下ftp登录不了的情况如何解决
Admin 2022-08-23 群英技术资讯 1388 次浏览
在实际应用中,我们有时候会遇到“Linux下ftp登录不了的情况如何解决”这样的问题,我们该怎样来处理呢?下文给大家介绍了解决方法,希望这篇“Linux下ftp登录不了的情况如何解决”文章能帮助大家解决问题。方法:1、用“yum -y install vsftpd”安装vsftpd;2、用“chkconfig iptables off”关闭防火墙;3、修改vsftp文件允许root用户登录;4、修改config中disabled模式并重启即可。

本教程操作环境:linux7.3系统、Dell G3电脑。
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, 然后重启
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
linux中查看ip的命令:1、ip命令,可以同时显示IPv4和IPv6地址,语法为“ip addr show”;2、hostname命令,可以查看主机名的IP地址,语法为“hostname -I”;3、ifconfig命令,可以查询和配置网络接口卡,语法为“ifconfig -a”;4、curl命令,是一款强大的http命令行工具,语法为“curl ifconfig.me”。
今天和大家介绍ssh的几个应用,常见的应用有使用ssh连接远程的服务器、使用sftp进行文件的传输、通过ssh进行异地备份等。
centos下Mysql的备份,权限与日志
基于CentOS下搭建 WordPress 个人博客
相信很多朋友都玩过虚拟机,在虚拟机里装linux系统。一般大家装linux系统后,第一件事就是去配置静态IP。配置静态IP,除了要配置IP、子网掩码外,还需要填写网关地址。
成为群英会员,开启智能安全云计算之旅
立即注册关注或联系群英网络
7x24小时售前:400-678-4567
7x24小时售后:0668-2555666
24小时QQ客服
群英微信公众号
CNNIC域名投诉举报处理平台
服务电话:010-58813000
服务邮箱:service@cnnic.cn
投诉与建议:0668-2555555
Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 ICP核准(ICP备案)粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008