F
F
FoxBoost2019-11-08 16:29:45
go
FoxBoost, 2019-11-08 16:29:45

How does FTP file transfer work?

I recently started learning the Go language and decided to implement my own simple FTP server for practice. With the processing of client commands, everything is more or less clear, but how is the transfer of the files themselves organized on a separate port? Is it just TCP packets that transfer the contents of the file from the client to the server? And what is the difference between the passive data transfer mode and the active one?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2019-11-08
@FoxBoost

Is it just TCP packets that transfer the contents of the file from the client to the server?

Yeah.
For the second question , the first link on Google says:
In active mode, when the client says "Hello!" it also tells the server a port number (from the dynamic range 1024-65535) so that the server can connect to the client to establish a data connection. The FTP server connects to the specified client port number using TCP port number 20 for data transfer.
In passive mode, after the client says "Hello!", the server tells the client the TCP port number (from the dynamic range 1024-65535) to which it can connect to establish a data connection.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question