freebsd关于pure-ftp的问题,客户端无法登录!!急,在线等待!!!

hhzxf 2007-06-14 10:37:09
我装的是freebsd 6,安装了pureftp+mysql作为ftp服务端,前段用得还好好的,但昨天晚上我重启机器之后,就不能用了,在进程里面也可以看到FTP服务端的进程,配置文件没有动过,现在就是能正常连,输入密码的时候就说验证错误,登录不了。服务本地连本地也一样。mysql数据库连接正常。具体信息如下:
ftp 127.0.0.1
Connected to 127.0.0.1.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 09:52. 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.
Name (127.0.0.1:root): loooh
331 User loooh OK. Password required
Password:
530 Login authentication failed
ftp: Login failed.
ftp>

...全文
405 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
dai_weitao 2007-06-14
  • 打赏
  • 举报
回复
显然是你的密码验证出问题了, MYSQL的连接问题
hhzxf 2007-06-14
  • 打赏
  • 举报
回复
连接mysql的配置文件如下:
pureftp-mysql.conf:
##############################################
# #
# Sample Pure-FTPd Mysql configuration file. #
# See README.MySQL for explanations. #
# #
##############################################


# Optional : MySQL server name or IP. Don't define this for unix sockets.

#MYSQLServer 127.0.0.1
# MYSQLServer 127.0.0.1


# Optional : MySQL port. Don't define this if a local unix socket is used.

# MYSQLPort 3306


# Optional : define the location of mysql.sock if the server runs on this host.

MYSQLSocket /tmp/mysql.sock


# Mandatory : user to bind the server as.

MYSQLUser ftpadmin


# Mandatory : user password. You must have a password.

MYSQLPassword XXXXXX


# Mandatory : database to open.

MYSQLDatabase pureftpd


# Mandatory : how passwords are stored
# Valid values are : "cleartext", "crypt", "md5" and "password"
# ("password" = MySQL password() function)
# You can also use "any" to try "crypt", "md5" *and* "password"

MYSQLCrypt cleartext


# In the following directives, parts of the strings are replaced at
# run-time before performing queries :
#
# \L is replaced by the login of the user trying to authenticate.
# \I is replaced by the IP address the user connected to.
# \P is replaced by the port number the user connected to.
# \R is replaced by the IP address the user connected from.
# \D is replaced by the remote IP address, as a long decimal number.
#
# Very complex queries can be performed using these substitution strings,
# especially for virtual hosting.


# Query to execute in order to fetch the password

MYSQLGetPW SELECT Password FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")


# Query to execute in order to fetch the system user name or uid

MYSQLGetUID SELECT Uid FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")


# Optional : default UID - if set this overrides MYSQLGetUID

#MYSQLDefaultUID 1000


# Query to execute in order to fetch the system user group or gid

MYSQLGetGID SELECT Gid FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")


# Optional : default GID - if set this overrides MYSQLGetGID

#MYSQLDefaultGID 1000


# Query to execute in order to fetch the home directory

MYSQLGetDir SELECT Dir FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")


# Optional : query to get the maximal number of files
# Pure-FTPd must have been compiled with virtual quotas support.

MySQLGetQTAFS SELECT QuotaFiles FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")


# Optional : query to get the maximal disk usage (virtual quotas)
# The number should be in Megabytes.
# Pure-FTPd must have been compiled with virtual quotas support.

MySQLGetQTASZ SELECT QuotaSize FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")


# Optional : ratios. The server has to be compiled with ratio support.

MySQLGetRatioUL SELECT ULRatio FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")
MySQLGetRatioDL SELECT DLRatio FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")


# Optional : bandwidth throttling.
# The server has to be compiled with throttling support.
# Values are in KB/s .

# MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")
# MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaccess = "*" OR Ipaccess LIKE "\R")

# Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
# 1) You know what you are doing.
# 2) Real and virtual users match.

# MySQLForceTildeExpansion 1


# If you upgraded your tables to transactionnal tables (Gemini,
# BerkeleyDB, Innobase...), you can enable SQL transactions to
# avoid races. Leave this commented if you are using the
# traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.

# MySQLTransactions On
hhzxf 2007-06-14
  • 打赏
  • 举报
回复
pure-ftpd.conf:
ChrootEveryone yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 2
VerboseLog no
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous yes
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
MySQLConfigFile /usr/local/etc/pureftpd-mysql.conf
ExtAuth /var/run/ftpd.sock
LimitRecursion 2000 8
AnonymousCanCreateDirs no
MaxLoad 4
PassivePortRange 30000 50000
AntiWarez yes
Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload yes
AltLog clf:/var/log/pureftpd.log
PIDFile /var/run/pure-ftpd.pid
MaxDiskUsage 99
CustomerProof yes

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧