百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>服务器> centos中pure-ftpd服务器错误: 530 Login authentication faile
分享文章到:

centos中pure-ftpd服务器错误: 530 Login authentication faile

发布时间:01/15 来源: 浏览: 关键词:
pure-ftpd服务器是一款ftp服务器,但小编有时会碰到530 Login authentication failed错误了,那么碰到此问题如何解决?下面一起来看看.


今天,连接pure-ftpd的时候竟然不能登录,总是提示:

530 Login authentication failed

Pure-Ftpd安装在debian6上,所以与Centos下有些不同,启用调试模式:
[root@localhost ~]# lftp
lftp :~> open -u feifei,"123456" 192.168.2.23
lftp feifei@192.168.2.23:~> debug
lftp feifei@192.168.2.23:~> ls
---- 正在连接到 192.168.2.23 (192.168.2.23) 端口 21
<--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
<--- 220-You are user number 2 of 50 allowed.
<--- 220-Local time is now 02:46. Server port: 21.
<--- 220-This is a private system - No anonymous login
<--- 220-IPv6 connections are also welcome on this server.
<--- 220 You will be disconnected after 15 minutes of inactivity.
---> FEAT
<--- 211-Extensions supported: 
<---  EPRT
<---  IDLE
<---  MDTM
<---  SIZE
<---  REST STREAM
<---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
<---  MLSD
<---  AUTH TLS
<---  PBSZ
<---  PROT
<---  UTF8
<---  TVFS
<---  ESTA
<---  PASV
<---  EPSV
<---  SPSV
<---  ESTP
<--- 211 End.
---> AUTH TLS
<--- 500 This security scheme is not implemented
---> OPTS UTF8 ON
<--- 200 OK, UTF-8 enabled 
---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
<--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
---> USER adminis
<--- 331 User feifei OK. Password required
---> PASS 123456
<--- 530 Login authentication failed
---> PWD
ls: 登录失败: 530 Login authentication failed
<--- 530 You aren't logged in
---> QUIT
<--- 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
<--- 221 Logout.
---- 关闭控制连接

pure-ftpd是使用puredb方式认证的,通过查看/usr/sbin/pure-ftpd-wrapper这个perl脚本后,发现下面一段代码:
119 # examine authentication files in /etc/pure-ftpd/auth
120
121 my @authfiles;
122
123 opendir (ETCAUTH, '/etc/pure-ftpd/auth')
124         &#124;&#124; die "$0: Couldn't examine directory /etc/pure-ftpd/auth: $!n";
125 @authfiles = sort (grep {-l "/etc/pure-ftpd/auth/$_"} readdir (ETCAUTH));
126 closedir (ETCAUTH);

上面,很清楚写着会检查/etc/pure-ftpd/auth/这个目录的认证文件,并且用sort进行排序,于是,我查看了一下服务器的/etc/pure-ftpd/auth/这个目录:

root@vps:~# ls /etc/pure-ftpd/auth
65unix  70pam

发现就只有pam和unix认证方式的认证文件,而没有puredb的,因为我的是使用puredb认证的,于是进行以下步骤:

root@vps:/etc/pure-ftpd/auth# ln -s /etc/pure-ftpd/conf/PureDB 60puredb  #前面的60就是用于排序的
root@vps:/etc/pure-ftpd/auth# ls
60puredb  65unix  70pam
root@vps:/etc/pure-ftpd/auth# /etc/init.d/pure-ftpd restart
Restarting ftp server: Running: /usr/sbin/pure-ftpd -l puredb:/etc/pure-ftpd/pureftpd.pdb -l pam -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -8 UTF-8 -E -B

可以看到,上面的启动参数已经增加了:-l puredb:/etc/pure-ftpd/pureftpd.pdb,而原来的启动参数如下:

root@vps:/etc/pure-ftpd/auth# /etc/init.d/pure-ftpd restart
Restarting ftp server: Running: /usr/sbin/pure-ftpd -l pam -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -8 UTF-8 -E -B

打赏

打赏

取消

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

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

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

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有7人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板