当前位置:首页 > linux教程 > 列表

centos中pure-ftpd服务器错误:530 Login authentication failed解决办法

发布:smiling 来源: PHP粉丝网  添加日期:2015-04-21 09:35:36 浏览: 评论:0 

pure-ftpd服务器是一款ftp服务器,但小编有时会碰到530 Login authentication failed错误了,那么碰到此问题如何解决?下面一起来看看.

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

530 Login authentication failed

Pure-Ftpd安装在debian6上,所以与Centos下有些不同,启用调试模式:

  1. [root@localhost ~]# lftp 
  2. lftp :~> open -u feifei,"123456" 192.168.2.23 
  3. lftp feifei@192.168.2.23:~> debug 
  4. lftp feifei@192.168.2.23:~> ls 
  5. ---- 正在连接到 192.168.2.23 (192.168.2.23) 端口 21 
  6. <--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 
  7. <--- 220-You are user number 2 of 50 allowed. 
  8. <--- 220-Local time is now 02:46. Server port: 21. 
  9. <--- 220-This is a private system - No anonymous login 
  10. <--- 220-IPv6 connections are also welcome on this server. 
  11. <--- 220 You will be disconnected after 15 minutes of inactivity. 
  12. ---> FEAT 
  13. <--- 211-Extensions supported:   
  14. <---  EPRT 
  15. <---  IDLE 
  16. <---  MDTM 
  17. <---  SIZE 
  18. <---  REST STREAM 
  19. <---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*; 
  20. <---  MLSD 
  21. <---  AUTH TLS 
  22. <---  PBSZ 
  23. <---  PROT 
  24. <---  UTF8 
  25. <---  TVFS 
  26. <---  ESTA 
  27. <---  PASV 
  28. <---  EPSV 
  29. <---  SPSV 
  30. <---  ESTP 
  31. <--- 211 End. 
  32. ---> AUTH TLS 
  33. <--- 500 This security scheme is not implemented 
  34. ---> OPTS UTF8 ON 
  35. <--- 200 OK, UTF-8 enabled   
  36. ---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid; 
  37. <--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;  --phpfensi.com 
  38. ---> USER adminis 
  39. <--- 331 User feifei OK. Password required 
  40. ---> PASS 123456 
  41. <--- 530 Login authentication failed 
  42. ---> PWD 

ls:登录失败:530 Login authentication failed

  1. <--- 530 You aren't logged in 
  2. ---> QUIT 
  3. <--- 221-Goodbye. You uploaded 0 and downloaded 0 kbytes. 
  4. <--- 221 Logout. 
  5. ---- 关闭控制连接 

pure-ftpd是使用puredb方式认证的,通过查看/usr/sbin/pure-ftpd-wrapper这个perl脚本后,发现下面一段代码:

  1.  # examine authentication files in /etc/pure-ftpd/auth 
  2.  
  3.  my @authfiles; 
  4.  
  5.  opendir (ETCAUTH, '/etc/pure-ftpd/auth'
  6.          &#124;&#124; die "$0: Couldn't examine directory /etc/pure-ftpd/auth: $!n"
  7.  @authfiles = sort (grep {-l "/etc/pure-ftpd/auth/$_"} readdir (ETCAUTH)); 
  8.  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就是用于排序的.

  1. root@vps:/etc/pure-ftpd/auth# ls 
  2. 60puredb  65unix  70pam 
  3. root@vps:/etc/pure-ftpd/auth# /etc/init.d/pure-ftpd restart 
  4. 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,而原来的启动参数如下:

  1. root@vps:/etc/pure-ftpd/auth# /etc/init.d/pure-ftpd restart 
  2. 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

Tags: pure-ftpd 530 authentication

分享到: