Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> 電腦軟件教程 >> 服務器技術 >> 關於服務器 >> FTP登陸錯誤詳解

FTP登陸錯誤詳解

日期:2017/2/8 10:33:50      編輯:關於服務器

ftp登陸不了是很經常碰到的事,很多人常常是不加分析就發貼詢問。老實說,這樣既浪費自己時間,又浪費別人精力,還常常不能得到滿意的回答。因此每一位希望從ftp站點發現資源的朋友都有必要學會分析登陸失敗的原因: 

所謂登陸提示,是指登陸時你與服務器雙向交流的一些指令及狀態提示,你如果看到類似這樣的字樣,那就是了: 
*** CuteFTP Pro 2.0 - build Dec 4 2001 *** 

狀態:> 正在獲取列表“”... 
狀態:> 正在連接到 ftp 服務器 211.*.*.*:* (ip = 211.*.*.*:*)... 
狀態:> Socket 已連接。正在等候歡迎消息... 
220 FTP服務器已啟動 
狀態:> 已連接。正在驗證... 
命令:> USER software 
331 User name okay, need password. 
命令:> PASS ***** 
230 User logged in, proceed. 
狀態:> 登錄成功。 
命令:> PWD 
257 "/" is current directory. 

這個東西是非常重要的,請一定加以注意。 

常見錯誤分析: 
如果見到下述字樣,並停留較長時間 
狀態:> 正在連接到 ftp 服務器 211.*.*.*:*(ip = 211.*.*.*:*)... 

之後見到: 
錯誤:> 無法連接到遠程服務器。Socket 錯誤 = #10060。 
狀態:> 正在等候 30 秒... 

出現該種情況有兩種可能: 
一為對方未開ftp或者無法連通,請與ftp管理者聯系 
二則是因為端口填寫錯誤。一般默認為21,但是因為此種端口在某些網絡中易引起沖突,安全性也值得商榷,故多數ftp更改了端口。如果你沒有填寫端口(ftp軟件會默認21)或者填寫錯誤,也會引起10060錯誤. 

如果見到下述字樣: 
Thu Mar 07 11:44:56 2002 530 Sorry, no ANONYMOUS access allowed 

表明該ftp不允許匿名者登陸,請與ftp管理者聯系,並取得賬號 

Thu Mar 07 11:46:29 2002 USER bugdown 
Thu Mar 07 11:46:30 2002 331 User name okay, need password. 
Thu Mar 07 11:46:30 2002 PASS ******** 
Thu Mar 07 11:46:30 2002 530 Not logged in. 
有兩種可能: 
1. 賬號或者密碼輸入錯誤,被拒絕登陸。請先確定你沒有輸入錯誤(較復雜的密碼建議用復制粘貼來填寫,並注意有無空格),然後與ftp管理者聯系以確認你的賬號沒有過期。目前大部分的ftp都會定期更改密碼,所以此宗錯誤是最常見的。 
2. 用了花生殼等動態域名,有時會出現這樣的現象:如果ftp沒有開,有人以動態域名登陸時,動態域名的服務商會將你自動轉到它自己的提示性ftp,這時有可能出現密碼錯誤,也有可能登陸到它的服務器。部分以iis為基礎建立的ftp有可能轉至微軟的服務器,現象類同。 

Thu Mar 07 11:51:25 2002 421 Too many users - please try again later. 

這是因為ftp管理者設定了該帳號(或者該域名)的最大登陸人數,現在已經達到這一限制,因此你無法登陸。只有等待其他用戶退出或者使用其他賬號,你才可能進入ftp. 

命令:> PASS ***** 
530 Not logged in, only one session from same IP allowed at a time. 
錯誤:> 未登錄。 
狀態:> 連接已關閉。 
該帳號只允許單線程登陸,因此請注意你是否打開多個窗口或者已經有一個線程在下載 

在登陸人數已滿,而你不斷嘗試登陸,有三種可能的情況: 
1 .你終於擠進去了 
2 .談出窗口提示錯誤,並在登陸錯誤指令見到這樣的字樣: 
錯誤:> 控制連接已關閉。 
表明ftp服務器攔截你這樣頻繁的嘗試。你可以不管它,確定之後繼續嘗試;但是稍有道德的人都應該把ftp軟件的全局設置中關於連接重試嘗試的間隔時間修改到較大,一般提倡30秒到2分鐘。 
3 .你被ban了。serv-U所作的服務器不能自動ban ip,但是管理者可以手工ban,部分服務器端軟件可以自動封ip。被ban的提示為: 
命令:> PASS ***** 
530 Not logged in, unauthorized IP address. 

上面的提示: 
命令:> PASS ***** 
530 Not logged in, unauthorized IP address. 
就是說你的ip是不合法的,不管是因為什麼原因,總之除非你與管理者聯系並解封,實在是沒有繼續嘗試的必要。當然,管理者可能只是ban你一段時間,你可以過後再重新嘗試。但是一定記得更改你的嘗試間隔時間。 

有時候不是因為封了你,而是因為該帳號限制只有部分許可的ip可以登陸,同樣你必須與管理者聯系,請他手工添加你的ip

常見FTP登陸Log信息: 
1. Connected. Waiting for response. 
  220 Serv-U FTP Server v4.0 for WinSock ready... 
  USER anonymous 
  530 Sorry, no ANONYMOUS access allowed. 
  QUIT 
  這個就是不許匿名登錄啦 
2. Connected. Waiting for response. 
  220 Serv-U FTP Server v4.0 for WinSock ready... 
  USER test 
  331 User name okay, need password. 
  PASS xxxxxx 
  530 Not logged in. 
  QUIT 
  一般是密碼輸入錯誤時出現的信息,但對於Serv-U來說,如果沒有這個帳號(test)存在,也會產生同樣的出錯信息。 
3. Connecting to xxx.xxx.xxx.xxx, Port 21 (#1) 
  ERROR: Connection timed out 
  這個表明對方未開機,也可能是對方不在你能訪問的范圍內 
4. Connecting to xxx.xxx.xxx.xxx Port 21 (#1) 
  ERROR: Connection refused 
  這個一般表明對方已開機,但未開啟FTP服務(沒有開Serv-U) 
  也可能為對方不提供在這個端口上的服務 
5. Connecting to xxx.xxx.xxx.xxx, Port 21 (#1) 
  Connected. Waiting for response. 
  Disconnected from server. 
  Connection attempt failed. Waiting for retry... 
  出現這個信息實在是很倒霉,你極有可能被對方Ban了。 
如果只是Ban幾分鐘or幾小時or一天還好,不然只有和站長說說好話,讓他給你解封吧。 
6. Connecting to xxx.xxx.xxx.xxx, Port 21 (#1) 
  Connected. Waiting for response. 
  USER XXX 
  331 User name okay, need password 
  PASS xxxxxx 
  530 Not logged in, unauthorized IP address. 
  QUIT 
  這個有點麻煩,你的IP不在站長允許訪問的IP范圍內,只有和站長聯系,讓他把你的IP網段加入Allow Access列表裡吧 
7. Connected. Waiting for response. 
  220 Serv-U FTP Server v4.0 for WinSock ready... 
  USER user 
  421 Too many users - please try again later. 
  哈哈,這個很常見吧,用戶太多,去過交大的都知道該怎麼做 
8. Connected. Waiting for response. 
  220 Serv-U FTP Server v4.0 for WinSock ready... 
  USER test 
  530 Not logged in, only one(也有可能是two or three) session from same IP allowed at a time. 
  QUIT 
  每個IP只能開一個(也有可能是two or three) 下載,就不要用多線程啦,小心Ban了你。

FTP信息代碼全解:
110 Restart marker reply. In this case, the text is exact and not left to the particular implementation; it must read: MARK yyyy = mmmm where yyyy is User-process data stream marker, and mmmm server's equivalent marker (note the spaces between markers and "=".
     重新啟動標志回應。這種情況下,信息是精確的並且不用特別的處理;可以這樣看:標記 yyyy = mmm 中 yyyy是 用戶進程數據流標記,mmmm是服務器端相應的標記(注意在標記和等號間的空格)
120 Service ready in nnn minutes.
     服務在NNN時間內可用
125 Data connection already open; transfer starting.
     數據連接已經打開,開始傳送數據.
150 File status okay; about to open data connection.
     文件狀態正確,正在打開數據連接.
200 Command okay.
     命令執行正常結束.
202 Command not implemented, superfluous at this site.
     命令未被執行,此站點不支持此命令.
211 System status, or system help reply.
     系統狀態或系統幫助信息回應.
212 Directory status.
     目錄狀態信息.
213 File status.
     文件狀態信息.
214 Help message.On how to use the server or the meaning of a particular non-        standard command. This reply is useful only to the human user. 
     幫助信息。關於如何使用本服務 器或特殊的非標准命令。此回復只對人有用。
215 NAME system type. Where NAME is an official system name from the list in the Assigned Numbers document.
     NAME系統類型。
220 Service ready for new user.
     連接的用戶的服務已就緒
221 Service closing control connection.
     控制連接關閉
225 Data connection open; no transfer in progress.
     數據連接已打開,沒有進行中的數據傳送
226 Closing data connection. Requested file action successful (for example, file transfer or file abort).
     正在關閉數據連接。請求文件動作成功結束(例如,文件傳送或終止)
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
     進入被動模式
230 User logged in, proceed. Logged out if appropriate.
     戶已登入。 如果不需要可以登出。
250 Requested file action okay, completed.
     被請求文件操作成功完成
257 "PATHNAME" created.
     路徑已建立
331 User name okay, need password.
     用戶名存在,需要輸入密碼
332 Need account for login.
     需要登陸的賬戶
350 Requested file action pending further information
     對被請求文件的操作需要進一步更多的信息
421 Service not available, closing control connection.This may be a reply to any command if the service knows it must shut down.
     服務不可用,控制連接關閉。這可能是對任何命令的回應,如果服務認為它必須關閉
425 Can't open data connection.
     打開數據連接失敗
426 Connection closed; transfer aborted.
     連接關閉,傳送中止。
450 Requested file action not taken.
     對被請求文件的操作未被執行
451 Requested action aborted. Local error in processing.
     請求的操作中止。處理中發生本地錯誤。
452 Requested action not taken. Insufficient storage space in system.File unavailable (e.g., file busy).
     請求的操作沒有被執行。 系統存儲空間不足。 文件不可用
500 Syntax error, command unrecognized. This may include errors such as command line too long.
     語法錯誤,不可識別的命令。 這可能是命令行過長。
501 Syntax error in parameters or arguments.
     參數錯誤導致的語法錯誤
502 Command not implemented.
     命令未被執行
503 Bad sequence of commands.
     命令的次序錯誤。
504 Command not implemented for that parameter.
     由於參數錯誤,命令未被執行
530 Not logged in.
     沒有登錄
532 Need account for storing files.
     存儲文件需要賬戶信息
550 Requested action not taken. File unavailable (e.g., file not found, no access).
     請求操作未被執行,文件不可用。
551 Requested action aborted. Page type unknown.
     請求操作中止,頁面類型未知
552 Requested file action aborted. Exceeded storage allocation (for current directory or dataset).
     請求文件的操作中止。 超出存儲分配

553 Requested action not taken. File name not allowed
     請求操作未被執行。 文件名不允許

Copyright © Windows教程網 All Rights Reserved