Question : FTP error

Hello,

I'm trying to write my little FTP client (part of my bigger project). I'm getting this error and I have no idea what's wrong...

I always get error when I try to issue a command "LIST", any idea why?

note: I can use FTP command and log to the server without any problems.... I just want to write my own FTP....

here is what I type and the reply from the server....


TELNET server1 21
220 server1 FTP server (Authorized Use Only) ready.
USER jiri
331 Password required for jiri.
PASS mypassword
230 User jiri logged in.
TYPE A
200 Type set to A.
CDW /work1
500 'CDW /work1': command not understood.
CWD /work1
250 CWD command successful.
LIST
425 Can't build data connection: Connection refused.




Answer : FTP error

did you maintain a data connection? under normal conditions, you are supposed to listen on a port, such that
when you LIST, the server sends you the data through the data connection. refer to RFC 959 for more details:

http://www.faqs.org/rfcs/rfc959.html

look under Section 3.2 ESTABLISHING DATA CONNECTIONS

Random Solutions  
 
programming4us programming4us