vsftp服务器root账户不能用于ftp登录的解决方法

一、修改配置文件,允许root登录

默认情况下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 服务 即可

 

 

 

二、修改配置文件运行匿名登录

原因:

   vsftp服务器安装后默认不允许本地用户登录,出现该错误。需要修改vsftp配置文件。

解决:

    vi /etc/vsftpd.conf

将local_enable=YES前的#(注释)取消;

在anonymous_enable=YES前加上#。

重启vsftp服务:

/etc/init.d/vsftpd restart

vsftp服务器root账户不能用于ftp登录的解决方法

上一篇:reportview 安装使用


下一篇:boost asio 与 自定义通信协议的解包