ftp无法连接登录linux的解决方法


本文摘自PHP中文网,作者V,侵删。

1、首先安装vsftpd

命令:

1

yum -y install vsftpd

之后开启服务:

1

service vsftpd start

2、关闭防火墙

1) 重启后生效

开启:

1

chkconfig iptables on

关闭:

1

chkconfig iptables off

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

开启:

1

service iptables start

关闭:

1

service iptables stop

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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

首先找到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无法连接登录linux的解决方法的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

linux中磁盘空间不足的解决方法

linux桥接模式下配置静态ip的方法

linux进程间通信的方式有哪些

linux使用mail命令发送邮件的方法

linux退出vi命令是什么

linux 无法识别usb怎么办

linux操作系统如何在ecs上搭建docker

linux与windows文件显示乱码

如何在linux中更改账户密码?(代码示例)

linux下查看内存的命令是什么?

更多相关阅读请进入《FTP》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...