I'm implementing a simple FTP server. When debugging, I try to use FileZilla client to connet my server. The request and response pattern found in the command panel is listed below:
GREETING: 220 (FTP v1.0)
REQUEST: USER ***
RESPONS: 331 Password?
REQUEST: PASS ********
RESPONS: 230 login successfully.
REQUEST: PWD
RESPONS: 257 "/a/" is current directory.
REQUEST: TYPE I
RESPONS: 200 Type set to I.
REQUEST: PASV
RESPONS: 200 127,255,0,0,175,200(I specify local port 45000)
REQUEST: LIST
RESPONS: 150 here is the listing
RESPONS: 226 Transfer done.
However, there is an error followed Fail to read directroy.
I think the passive connection is indeed established since I can get stream on the socket(I implement the server in C#). But I have no idea why is the error. Is it because I should send some handshake/greeting information like those in the control connection instead of sending the data directly to sync server and client? If yes, what's the status code of this information?
Thanks and Best Regards.