自从我从 Ubuntu 9.04 升级到 Debian 6.0 以来,我一直遇到这个问题:
Filezilla 将执行以下操作:
Status: Connecting to x.x.x.x:21...
Status: Connection established, waiting for welcome message...
Response: 220-Connected!
Response: 220 xxx Home Server
Command: USER xxx
Response: 331 Password required for xxx
Command: PASS ********
Response: 230-Welcome!
Response: 230 User xxx logged in
Command: SYST
Response: 230 Ls oi a:2011-11-06 00:41:06
Command: FEAT
Response: 215 UNIX Type: L8
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 211-Features:
Response: LANG en-US.UTF-8*;en-US
Response: MDTM
Response: MFMT
Response: TVFS
Response: UTF8
Response: MFF modify;UNIX.group;UNIX.mode;
Response: MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
Response: REST STREAM
Response: SIZE
Response: 211 End
Error: Failed to parse returned path.
Error: Failed to retrieve directory listing
Response: 257 "/" is the current directory
Error: Connection closed by server
但是如果我再次单击“快速连接”:
Status: Connecting to x.x.x.x:21...
Status: Connection established, waiting for welcome message...
Response: 220-Connected!
Response: 220 xxxx Home Server
Command: USER xxxx
Response: 331 Password required for xxxx
Command: PASS ********
Response: 230-Welcome!
Response: 230 User xxxx logged in
Status: Connected
Response: 230 Ls oi a:2011-11-06 00:48:32
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Status: Directory listing successful
哇,奇怪,如果我尝试使用在线 FTP 测试器,我还发现功能没有被打印:
Status: Connecting to x.x.x.x
Status: Connected, waiting for welcome message
Reply: 220-Connected!
Reply: 220 xxxx Home Server
Command: CLNT http://ftptest.net on behalf of y.y.y.y
Reply: 500 CLNT not understood
Command: USER xxxx
Reply: 331 Password required for xxxx
Command: PASS ********
Reply: 230-Welcome!
Reply: 230 User xxxx logged in
Command: SYST
Reply: 230 Ls oi a:2011-11-06 00:44:45
Command: FEAT
Reply: 215 UNIX Type: L8
Command: PWD
Reply: 211-Features:
Reply: LANG en-US.UTF-8;en-US*
Reply: MDTM
Reply: MFMT
Reply: TVFS
Reply: UTF8
Reply: MFF modify;UNIX.group;UNIX.mode;
Reply: MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
Reply: REST STREAM
Reply: SIZE
Reply: 211 End
Error: No path found in PWD reply
我已经研究配置一段时间了,但完全不知道该怎么做(这似乎与 ProFTPd 如何响应请求有关,但我还没有确定为什么它会随机地吐出功能列表)。:( 有什么想法吗?ProFTPd 在 1.3.3 中自己崩溃了吗?
proftpd.conf:
LoadModule mod_sql.c
LoadModule mod_sql_mysql.c
#LoadModule mod_tls.c
ServerName xxxx
ServerType standalone
ServerIdent on "xxxx Home Server"
DeferWelcome on
DefaultServer on
AllowStoreRestart on
AllowRetrieveRestart on
RequireValidShell off
PathDenyFilter "\\.ftp)|\\.ht)[a-z]+$"
DefaultRoot ~
DenyFilter \*.*/
UseReverseDNS off
IdentLookups off
# Various messages.
DisplayLogin /etc/proftpd/.welcome # Textfile to display on login
DisplayConnect /etc/proftpd/.connect # Textfile to display on connection
DisplayChdir /etc/proftpd/.firstchdir # Textfile to display on first changedir
Port 21
PassivePorts 49152 65535
MaxInstances 15
MaxClientsPerHost 50 "Only %m connections per host allowed"
MaxClients 100 "Only %m total simultanious logins allowed"
MaxHostsPerUser 10
User nobody
Group nogroup
Umask 000
ScoreboardFile /var/log/scoreboard
Include /etc/proftpd/sql.conf
<Global>
DeferWelcome on
</Global>
sql.conf:
# Set up authentication via SQL
# ===========
AuthOrder mod_sql.c
SQLAuthTypes Backend
SQLConnectInfo proftpd_admin@localhost user pass
SQLUserInfo usertable userid passwd uid gid homedir shell
SQLGroupInfo grouptable groupname gid members
SQLUserWhereClause "disabled=0 and (NOW()<=expiration or expiration=-1 or expiration=0)"
# Log the user logging in
SQLLog PASS counter
SQLNamedQuery counter UPDATE "lastlogin=now(), count=count+1 WHERE userid='%u'" usertable
# logout log
SQLLog EXIT time_logout
SQLNamedQuery time_logout UPDATE "lastlogout=now() WHERE userid='%u'" usertable
# display last login time when PASS command is given
SQLNamedQuery login_time SELECT "lastlogin from usertable where userid='%u'"
SQLShowInfo PASS "230" "Last login was: %{login_time}"
# xfer Log in mysql
SQLLog RETR,STOR transfer1
SQLNamedQuery transfer1 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T', now(), 'c', NULL" xfer_stat
SQLLOG ERR_RETR,ERR_STOR transfer2
SQLNamedQuery transfer2 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T', now(), 'i', NULL" xfer_stat
答案1
这行输出不应该出现,或至少不应该看起来像这样:
Reply: 230 Ls oi a:2011-11-06 00:44:45
它被解释为“SYST”的输出,因此当发出“FEAT”命令时,将读取“SYST”输出,而当发出“PWD”时,将读取某些功能响应。
第二个连接不需要 SYST 和 FEAT,因此时间似乎更宽容。
这网上知道还有另外一个人遇到过这个问题(缺少该字母组合!)其解决方法是:
尝试从 sql.conf 文件中注释掉 SQLShowInfo 行。
这Debian 错误表示该问题已在 1.3.4 预发布版上游得到修复,并建议您可能必须使用反向移植才能获得正确的行为,因为它不太可能被视为关键功能或安全性,因此需要稳定的补丁。