FTP 传输失败,错误 426

FTP 传输失败,错误 426

我有一个在 RedHat 主机上运行的 vsftpd 服务器,以及一个使用 FTP 与服务器传输文件的应用程序。

一些传输没有问题,但对于某些文件,它会失败并出现错误 426。我尝试使用 FileZilla 而不是其他应用程序(相同的文件、相同的客户端计算机、相同的目的地、相同的用户)传输文件,并且它可以工作。

我无法控制客户端应用程序,因此我使用 WireShark 来尝试了解发生了什么。

No.     Time           Source                Destination           Protocol Length Info
  59945 53.762728      [client ip]         [ftp server]         FTP      71     Request: RETR Batch.func
  59950 53.763219      [ftp server]         [client ip]         TCP      74     20→52604 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=2261468899 TSecr=0 WS=128
  59951 53.763284      [client ip]         [ftp server]         TCP      74     52604→20 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1 TSval=54157713 TSecr=2261468899
  59957 53.763868      [ftp server]         [client ip]         TCP      66     20→52604 [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=2261468900 TSecr=54157713
  59958 53.763868      [ftp server]         [client ip]         FTP      126    Response: 150 Opening BINARY mode data connection for Batch.func (305415 bytes).
  59959 53.763904      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59960 53.763936      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59961 53.763951      [client ip]         [ftp server]         TCP      66     52604→20 [ACK] Seq=1 Ack=2897 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
  59963 53.764080      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59964 53.764208      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59965 53.764230      [client ip]         [ftp server]         TCP      66     52604→20 [ACK] Seq=1 Ack=5793 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
  59966 53.764354      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59967 53.764492      [ftp server]         [client ip]         FTP-DATA 1018   FTP Data: 952 bytes
  59968 53.764494      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59969 53.764516      [client ip]         [ftp server]         TCP      66     52604→20 [ACK] Seq=1 Ack=9641 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
  59970 53.764524      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59971 53.764526      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59972 53.764527      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59973 53.764541      [client ip]         [ftp server]         TCP      66     52604→20 [ACK] Seq=1 Ack=13985 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
  59977 53.764651      [client ip]         [ftp server]         TCP      66     52604→20 [FIN, ACK] Seq=1 Ack=13985 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
  59978 53.764705      [client ip]         [ftp server]         TCP      54     52604→20 [RST, ACK] Seq=2 Ack=13985 Win=0 Len=0
  59980 53.764720      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59981 53.764734      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59982 53.764752      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59983 53.764760      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59984 53.764766      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59985 53.764774      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59986 53.764780      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59987 53.764788      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59988 53.764795      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59989 53.764802      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59991 53.764985      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59992 53.764987      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59993 53.765008      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59994 53.765015      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59995 53.765157      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59996 53.765173      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59997 53.765186      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  59998 53.765194      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  59999 53.765200      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  60000 53.765212      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  60001 53.765225      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  60002 53.765227      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  60003 53.765228      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  60004 53.765229      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  60005 53.765238      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  60006 53.765244      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  60007 53.765250      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  60008 53.765255      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  60009 53.765261      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  60010 53.765269      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  60015 53.765465      [ftp server]         [client ip]         FTP-DATA 1514   FTP Data: 1448 bytes
  60016 53.765476      [client ip]         [ftp server]         TCP      54     52604→20 [RST] Seq=1 Win=0 Len=0
  60017 53.765484      [ftp server]         [client ip]         FTP      91     Response: 426 Failure writing network stream.
  60018 53.765504      [client ip]         [ftp server]         TCP      54     52602→21 [ACK] Seq=292 Ack=531 Win=130816 Len=0
  60030 53.768012      [client ip]         [ftp server]         FTP      60     Request: QUIT
  60036 53.768691      [ftp server]         [client ip]         FTP      68     Response: 221 Goodbye.
  60037 53.768692      [ftp server]         [client ip]         TCP      60     21→52602 [FIN, ACK] Seq=545 Ack=298 Win=29312 Len=0
  60038 53.768732      [client ip]         [ftp server]         TCP      54     52602→21 [ACK] Seq=298 Ack=546 Win=130816 Len=0
  60042 53.768875      [client ip]         [ftp server]         TCP      54     52602→21 [FIN, ACK] Seq=298 Ack=546 Win=130816 Len=0
  60045 53.769297      [ftp server]         [client ip]         TCP      60     21→52602 [ACK] Seq=546 Ack=299 Win=29312 Len=0

显然,服务器开始向客户端发送数据,但发送几个数据包后,客户端就结束了传输。

我可以更改 vsftp 中的某些设置来修复此问题吗?

谢谢。

同一文件传输的 FileZilla 日志:

2017-09-29 08:22:15 9980 3 Command: TYPE I
2017-09-29 08:22:15 9980 3 Response: 200 Switching to Binary mode.
2017-09-29 08:22:15 9980 3 Command: PASV
2017-09-29 08:22:15 9980 3 Response: 227 Entering Passive Mode (172,16,10,192,218,176).
2017-09-29 08:22:15 9980 3 Command: RETR Batch.func
2017-09-29 08:22:15 9980 3 Response: 150 Opening BINARY mode data connection for Batch.func (305415 bytes).
2017-09-29 08:22:15 9980 3 Response: 226 Transfer complete.
2017-09-29 08:22:15 9980 3 Status: File transfer successful, transferred 305,415 bytes in 1 second

相关内容