proftpd连接mysql登录失败

 

   重启服务器后发现ftp无法正常登录了,看日志感觉也没什么错误信息,我的ftp服务器是用proftpd和mysql结合的(详见附件),百度GOOGLE也找不到答案.只好从日志入手了,

#tail -f /var/log/*.log

登录ftp服务器,出现以下信息:

 

 Jun 27 23:57:47 mod_sql/4.3[10140]: entering    mysql cmd_close
Jun 27 23:57:47 mod_sql/4.3[10140]: connection 'default' count is now 1
Jun 27 23:57:47 mod_sql/4.3[10140]: exiting mysql cmd_close
Jun 27 23:57:47 mod_sql/4.3[10140]: exiting mysql cmd_select
Jun 27 23:57:47 mod_sql/4.3[10140]: <<< cmd_getgroups
Jun 27 23:57:47 mod_sql/4.3[10140]: >>> cmd_auth
Jun 27 23:57:47 mod_sql/4.3[10140]: entering mysql cmd_escapestring
Jun 27 23:57:47 mod_sql/4.3[10140]: entering mysql cmd_open
Jun 27 23:57:47 mod_sql/4.3[10140]: connection 'default' count is now 2
Jun 27 23:57:47 mod_sql/4.3[10140]: exiting mysql cmd_open
Jun 27 23:57:47 mod_sql/4.3[10140]: entering mysql cmd_close
Jun 27 23:57:47 mod_sql/4.3[10140]: connection 'default' count is now 1
Jun 27 23:57:47 mod_sql/4.3[10140]: exiting mysql cmd_close
Jun 27 23:57:47 mod_sql/4.3[10140]: exiting mysql cmd_escapestring
Jun 27 23:57:47 mod_sql/4.3[10140]: cache hit for user 'greycode'
Jun 27 23:57:47 mod_sql/4.3[10140]: >>> cmd_check
Jun 27 23:57:47 mod_sql/4.3[10140]: checking password using SQLAuthType 'Plaintext'
Jun 27 23:57:47 mod_sql/4.3[10140]: 'Plaintext' SQLAuthType handler reports success
Jun 27 23:57:47 mod_sql/4.3[10140]: cache hit for user 'greycode'
Jun 27 23:57:47 mod_sql/4.3[10140]: <<< cmd_check
Jun 27 23:57:47 mod_sql/4.3[10140]: <<< cmd_auth
Jun 27 23:57:47 mod_sql/4.3[10140]: >>> cmd_getpwnam
Jun 27 23:57:47 mod_sql/4.3[10140]: cache hit for user 'greycode'
Jun 27 23:57:47 mod_sql/4.3[10140]: <<< cmd_getpwnam
Jun 27 23:57:47 mod_sql/4.3[10140]: >>> cmd_getpwnam
Jun 27 23:57:47 mod_sql/4.3[10140]: cache hit for user 'greycode'
Jun 27 23:57:47 mod_sql/4.3[10140]: <<< cmd_getpwnam
Jun 27 15:57:47 mod_sql/4.3[10140]: entering mysql cmd_exit
Jun 27 15:57:47 mod_sql/4.3[10140]: entering mysql cmd_close
Jun 27 15:57:47 mod_sql/4.3[10140]: connection 'default' closed
Jun 27 15:57:47 mod_sql/4.3[10140]: connection 'default' count is now 0
Jun 27 15:57:47 mod_sql/4.3[10140]: exiting mysql cmd_close
Jun 27 15:57:47 mod_sql/4.3[10140]: exiting mysql cmd_exit

 

userid passwd uid gid homedir shell count host lastlogin
用户名和密码都没错,最可能影响结果的就是uid和gid,homedir,shell了
看了一下homedir的权限,竟然是700,
很有可能就是权限问题,试试改权限有没有用~
#chmod 755 /var/ftp -R
再次登录竟然成功了!看来是在proftpd运行的时候修改了ftp目录的权限,重启服务器后proftpd重新读取权限造成的!
附:ProFTPD_支持MySQL数据库添加虚拟用户认证及Quotas.docproftpd_支持mysql数据库添加虚拟用户认证及quotas.doc

 



发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>