远程服务器 (Hostgator) 的下载可以在 Filezilla 中运行,但任何类型的上传或文件编辑都会失败

远程服务器 (Hostgator) 的下载可以在 Filezilla 中运行,但任何类型的上传或文件编辑都会失败

我尝试通过 FTP 上传,但由于某种原因,所有上传都失败了。我的设置位于具有严格防火墙规则的公司网络内。我在连接到未过滤 WiFi 的自己的笔记本电脑上尝试了 Filezilla 上的完全相同的设置,上传和下载都可以在我的 Hostgator 文件主机上正常工作。但是在公司,只有下载可以正常工作。以下是完整日志:

2018-02-21 11:59:19 9864 1 Status: Connecting to 192.254.183.85:21...
    2018-02-21 11:59:19 9864 1 Status: Connection established, waiting for welcome message...
    2018-02-21 11:59:21 9864 1 Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    2018-02-21 11:59:21 9864 1 Response: 220-You are user number 2 of 150 allowed.
    2018-02-21 11:59:21 9864 1 Response: 220-Local time is now 10:59. Server port: 21.
    2018-02-21 11:59:21 9864 1 Response: 220-IPv6 connections are also welcome on this server.
    2018-02-21 11:59:21 9864 1 Response: 220 You will be disconnected after 15 minutes of inactivity.
    2018-02-21 11:59:21 9864 1 Command: USER greybox
    2018-02-21 11:59:21 9864 1 Response: 331 User greybox OK. Password required
    2018-02-21 11:59:21 9864 1 Command: PASS *******************
    2018-02-21 11:59:22 9864 1 Response: 230 OK. Current restricted directory is /
    2018-02-21 11:59:22 9864 1 Command: SYST
    2018-02-21 11:59:23 9864 1 Response: 215 UNIX Type: L8
    2018-02-21 11:59:23 9864 1 Command: FEAT
    2018-02-21 11:59:23 9864 1 Response: 211-Extensions supported:
    2018-02-21 11:59:23 9864 1 Response:  EPRT
    2018-02-21 11:59:23 9864 1 Response:  IDLE
    2018-02-21 11:59:23 9864 1 Response:  MDTM
    2018-02-21 11:59:23 9864 1 Response:  SIZE
    2018-02-21 11:59:23 9864 1 Response:  MFMT
    2018-02-21 11:59:23 9864 1 Response:  REST STREAM
    2018-02-21 11:59:23 9864 1 Response:  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
    2018-02-21 11:59:23 9864 1 Response:  MLSD
    2018-02-21 11:59:23 9864 1 Response:  AUTH TLS
    2018-02-21 11:59:23 9864 1 Response:  PBSZ
    2018-02-21 11:59:23 9864 1 Response:  PROT
    2018-02-21 11:59:23 9864 1 Response:  UTF8
    2018-02-21 11:59:23 9864 1 Response:  TVFS
    2018-02-21 11:59:23 9864 1 Response:  ESTA
    2018-02-21 11:59:23 9864 1 Response:  PASV
    2018-02-21 11:59:23 9864 1 Response:  EPSV
    2018-02-21 11:59:23 9864 1 Response:  SPSV
    2018-02-21 11:59:23 9864 1 Response:  ESTP
    2018-02-21 11:59:23 9864 1 Response: 211 End.
    2018-02-21 11:59:23 9864 1 Command: OPTS UTF8 ON
    2018-02-21 11:59:24 9864 1 Response: 200 OK, UTF-8 enabled
    2018-02-21 11:59:24 9864 1 Status: Logged in
    2018-02-21 11:59:24 9864 1 Status: Retrieving directory listing...
    2018-02-21 11:59:24 9864 1 Command: PWD
    2018-02-21 11:59:25 9864 1 Response: 257 "/" is your current location
    2018-02-21 11:59:25 9864 1 Command: TYPE I
    2018-02-21 11:59:25 9864 1 Response: 200 TYPE is now 8-bit binary
    2018-02-21 11:59:25 9864 1 Command: PASV
    2018-02-21 11:59:26 9864 1 Response: 227 Entering Passive Mode (192,254,183,85,135,45)
    2018-02-21 11:59:26 9864 1 Command: MLSD
    2018-02-21 11:59:27 9864 1 Response: 150 Accepted data connection
    2018-02-21 11:59:27 9864 1 Response: 226-Options: -a -l 
    2018-02-21 11:59:27 9864 1 Response: 226 49 matches total
    2018-02-21 11:59:28 9864 1 Status: Directory listing of "/" successful
    2018-02-21 11:59:31 9864 1 Status: Retrieving directory listing of "/public_html"...
    2018-02-21 11:59:31 9864 1 Command: CWD public_html
    2018-02-21 11:59:31 9864 1 Response: 250 OK. Current directory is /public_html
    2018-02-21 11:59:31 9864 1 Command: PWD
    2018-02-21 11:59:32 9864 1 Response: 257 "/public_html" is your current location
    2018-02-21 11:59:32 9864 1 Command: PASV
    2018-02-21 11:59:33 9864 1 Response: 227 Entering Passive Mode (192,254,183,85,121,111)
    2018-02-21 11:59:33 9864 1 Command: MLSD
    2018-02-21 11:59:34 9864 1 Response: 150 Accepted data connection
    2018-02-21 11:59:34 9864 1 Response: 226-Options: -a -l 
    2018-02-21 11:59:34 9864 1 Response: 226 70 matches total
    2018-02-21 11:59:34 9864 1 Status: Directory listing of "/public_html" successful
    2018-02-21 11:59:39 9864 3 Status: Connecting to 192.254.183.85:21...
    2018-02-21 11:59:39 9864 3 Status: Connection established, waiting for welcome message...
    2018-02-21 11:59:40 9864 3 Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    2018-02-21 11:59:40 9864 3 Response: 220-You are user number 2 of 150 allowed.
    2018-02-21 11:59:40 9864 3 Response: 220-Local time is now 10:59. Server port: 21.
    2018-02-21 11:59:40 9864 3 Response: 220-IPv6 connections are also welcome on this server.
    2018-02-21 11:59:40 9864 3 Response: 220 You will be disconnected after 15 minutes of inactivity.
    2018-02-21 11:59:40 9864 3 Command: USER greybox
    2018-02-21 11:59:41 9864 3 Response: 331 User greybox OK. Password required
    2018-02-21 11:59:41 9864 3 Command: PASS *******************
    2018-02-21 11:59:42 9864 3 Response: 230 OK. Current restricted directory is /
    2018-02-21 11:59:42 9864 3 Command: OPTS UTF8 ON
    2018-02-21 11:59:42 9864 3 Response: 200 OK, UTF-8 enabled
    2018-02-21 11:59:42 9864 3 Status: Logged in
    2018-02-21 11:59:42 9864 3 Status: Starting upload of C:\Sandbox\ex1.py
    2018-02-21 11:59:42 9864 3 Command: CWD /public_html
    2018-02-21 11:59:43 9864 3 Response: 250 OK. Current directory is /public_html
    2018-02-21 11:59:43 9864 3 Command: PWD
    2018-02-21 11:59:44 9864 3 Response: 257 "/public_html" is your current location
    2018-02-21 11:59:44 9864 3 Command: TYPE A
    2018-02-21 11:59:44 9864 3 Response: 200 TYPE is now ASCII
    2018-02-21 11:59:44 9864 3 Command: PASV
    2018-02-21 11:59:45 9864 3 Response: 227 Entering Passive Mode (192,254,183,85,135,249)
    2018-02-21 11:59:45 9864 3 Command: STOR ex1.py
    2018-02-21 11:59:46 9864 3 Error: Connection closed by server
    2018-02-21 11:59:46 9864 3 Error: File transfer failed
    2018-02-21 11:59:46 9864 3 Status: Disconnected from server
    2018-02-21 11:59:46 9864 3 Status: Connecting to 192.254.183.85:21...
    2018-02-21 11:59:46 9864 3 Status: Connection established, waiting for welcome message...
    2018-02-21 11:59:48 9864 3 Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    2018-02-21 11:59:48 9864 3 Response: 220-You are user number 2 of 150 allowed.
    2018-02-21 11:59:48 9864 3 Response: 220-Local time is now 10:59. Server port: 21.
    2018-02-21 11:59:48 9864 3 Response: 220-IPv6 connections are also welcome on this server.
    2018-02-21 11:59:48 9864 3 Response: 220 You will be disconnected after 15 minutes of inactivity.
    2018-02-21 11:59:48 9864 3 Command: USER greybox
    2018-02-21 11:59:48 9864 3 Response: 331 User greybox OK. Password required
    2018-02-21 11:59:48 9864 3 Command: PASS *******************
    2018-02-21 11:59:49 9864 3 Response: 230 OK. Current restricted directory is /
    2018-02-21 11:59:49 9864 3 Command: OPTS UTF8 ON
    2018-02-21 11:59:50 9864 3 Response: 200 OK, UTF-8 enabled
    2018-02-21 11:59:50 9864 3 Status: Logged in
    2018-02-21 11:59:50 9864 3 Status: Starting upload of C:\Sandbox\ex1.py
    2018-02-21 11:59:50 9864 3 Command: CWD /public_html
    2018-02-21 11:59:50 9864 3 Response: 250 OK. Current directory is /public_html
    2018-02-21 11:59:50 9864 3 Status: Retrieving directory listing of "/public_html"...
    2018-02-21 11:59:50 9864 3 Command: TYPE I
    2018-02-21 11:59:51 9864 3 Response: 200 TYPE is now 8-bit binary
    2018-02-21 11:59:51 9864 3 Command: PASV
    2018-02-21 11:59:52 9864 3 Response: 227 Entering Passive Mode (192,254,183,85,131,73)
    2018-02-21 11:59:52 9864 3 Command: MLSD
    2018-02-21 11:59:53 9864 3 Response: 150 Accepted data connection
    2018-02-21 11:59:53 9864 3 Response: 226-Options: -a -l 
    2018-02-21 11:59:53 9864 3 Response: 226 70 matches total
    2018-02-21 11:59:54 9864 3 Command: TYPE A
    2018-02-21 11:59:54 9864 3 Response: 200 TYPE is now ASCII
    2018-02-21 11:59:54 9864 3 Command: PASV
    2018-02-21 11:59:55 9864 3 Response: 227 Entering Passive Mode (192,254,183,85,136,148)
    2018-02-21 11:59:55 9864 3 Command: STOR ex1.py
    2018-02-21 11:59:55 9864 3 Error: Connection closed by server
    2018-02-21 11:59:55 9864 3 Error: File transfer failed
    2018-02-21 11:59:56 9864 3 Status: Disconnected from server
    2018-02-21 11:59:56 9864 3 Status: Connecting to 192.254.183.85:21...
    2018-02-21 11:59:56 9864 3 Status: Connection established, waiting for welcome message...
    2018-02-21 11:59:57 9864 3 Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    2018-02-21 11:59:57 9864 3 Response: 220-You are user number 2 of 150 allowed.
    2018-02-21 11:59:57 9864 3 Response: 220-Local time is now 10:59. Server port: 21.
    2018-02-21 11:59:57 9864 3 Response: 220-IPv6 connections are also welcome on this server.
    2018-02-21 11:59:57 9864 3 Response: 220 You will be disconnected after 15 minutes of inactivity.
    2018-02-21 11:59:57 9864 3 Command: USER greybox
    2018-02-21 11:59:58 9864 3 Response: 331 User greybox OK. Password required
    2018-02-21 11:59:58 9864 3 Command: PASS *******************
    2018-02-21 11:59:59 9864 3 Response: 230 OK. Current restricted directory is /
    2018-02-21 11:59:59 9864 3 Command: OPTS UTF8 ON
    2018-02-21 11:59:59 9864 3 Response: 200 OK, UTF-8 enabled
    2018-02-21 11:59:59 9864 3 Status: Logged in
    2018-02-21 11:59:59 9864 3 Status: Starting upload of C:\Sandbox\ex1.py
    2018-02-21 11:59:59 9864 3 Command: CWD /public_html
    2018-02-21 12:00:00 9864 3 Response: 250 OK. Current directory is /public_html
    2018-02-21 12:00:00 9864 3 Status: Retrieving directory listing of "/public_html"...
    2018-02-21 12:00:00 9864 3 Command: TYPE I
    2018-02-21 12:00:01 9864 3 Response: 200 TYPE is now 8-bit binary
    2018-02-21 12:00:01 9864 3 Command: PASV
    2018-02-21 12:00:01 9864 3 Response: 227 Entering Passive Mode (192,254,183,85,193,28)
    2018-02-21 12:00:01 9864 3 Command: MLSD
    2018-02-21 12:00:03 9864 3 Response: 150 Accepted data connection
    2018-02-21 12:00:03 9864 3 Response: 226-Options: -a -l 
    2018-02-21 12:00:03 9864 3 Response: 226 70 matches total
    2018-02-21 12:00:03 9864 3 Command: TYPE A
    2018-02-21 12:00:04 9864 3 Response: 200 TYPE is now ASCII
    2018-02-21 12:00:04 9864 3 Command: PASV
    2018-02-21 12:00:04 9864 3 Response: 227 Entering Passive Mode (192,254,183,85,167,136)
    2018-02-21 12:00:04 9864 3 Command: STOR ex1.py
    2018-02-21 12:00:05 9864 3 Error: Connection closed by server
    2018-02-21 12:00:05 9864 3 Error: File transfer failed

答案1

虽然回复得有点晚,但公司确认被动 FTP 已启用,但防火墙只允许少数目标端口进行主动模式传输。我创建了一个带有少量 PHP 的 Web 门户,以便文件上传通过 HTTP 传输到我的 Web 服务器,作为一种解决方法

相关内容