On Friday 12 April 2002 15:21 pm, sha kan wrote: > Hello Binand Raj S, > > Thanks for your prompt reply. One more pbl.
I hate sourceforge. Please click on Reply All and *remove* the non-list addresses from the To: list, before sending. > when i'm try to access remote ftp server using ws_ftp > or any telnet ftp, it gets authenticated, But while > giving dir, ls commands only error results like "500 > Illegal port command". > I've tried 'passive on' too, but same results. > I don't knowwhere the problem. > plz help asap. You need to understand the FTP protocol some more. It requires two connections - one control connection (the one you create by telnetting) and another data connection - the one you didn't create. Try this: binand@binand[~]:(12) nc ftp 21 220 marabar.cysphere.com FTP server (Version wu-2.6.1-16) ready. USER anonymous 331 Guest login ok, send your complete e-mail address as password. PASS [EMAIL PROTECTED] 230 Guest login ok, access restrictions apply. PASV 227 Entering Passive Mode (10,0,2,43,185,127) See that? The server is telling you how to get the data you requested for. You need to connect to that IP/port combination to get data - the first four numbers are the IP, the last two the port. The port to connect is 185 * 256 + 127 = 47487. So I do another nc in another window, and then: LIST 150 Opening ASCII mode data connection for directory listing. 226 Transfer complete. In the other nc window, I get: binand@binand[~]:(19) nc ftp 47487 total 32 d--x--x--x 2 root root 4096 Feb 21 09:01 bin d--x--x--x 2 root root 4096 Feb 21 09:01 etc dr-xr-xr-x 2 root root 4096 Feb 21 09:50 lib dr-xr-xr-x 10 root root 4096 Apr 2 11:53 pub Simple, isn't it? For active FTP, try this (taking the same port number as above, to simplify): binand@binand[~]:(20) nc -l -p 47487 and in the FTP window, PORT 10,0,0,14,185,127 200 PORT command successful. LIST 150 Opening ASCII mode data connection for directory listing. 226 Transfer complete. And get a similar directory listing in the nc -l window. Binand _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
