DWQA QuestionsCategory: ServerFTP remote access failed to get directory
Zorin asked 2 months ago

port configuration

Ender replied 2 months ago

Is FTP client & server on one machine?Can the remote server be SSH connected? Is it convenient to capture packets at the same time in FTP client and server?
Tcpdump - S 0 - I any host [peer IP] - w [*. Cap]

Ender replied 2 months ago

On the same machine, SSH can be connected.I use alicloud’s server. Port 21 is added to the security group,The 8uftp connection tool is used. Several connection methods of 8uftp have been tried, but they are not used

Ender replied 2 months ago

According to the idea of Yiyun, there are two channels for FTP transmission, command and data, and the port of command channel is fixed;The data channel ports are randomly assigned. From your screenshot, the commands are all OK. As for the port range of data channel, the FTP server has the final say. You can check how much the Ali cloud server is, if you can modify the server side, you can also configure the file to write dead.

1 Answers
Yiyun answered 2 months ago

Firewall configuration problem.
FTP passive mode requires two port numbers, one is 21, which is used to control commands, and the other is the one marked in red in your screenshot. The choice of this port number is not necessarily regular.
If you use it yourself (such as uploading and downloading code files yourself), SFTP is recommended.

Zorin replied 2 months ago

Thank you Yiyun and the big guys!
----Standing on the shoulders of giants, we will eventually become giants