LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   lftp Problem / Question (https://www.linuxquestions.org/questions/linux-software-2/lftp-problem-question-249656/)

LinuxGeek 10-31-2004 10:20 PM

lftp Problem / Question
 
I'm trying to connect to an ftp site which requires that you don't connect to it using passive mode. So I did the following:

Code:

lftp ftp://username:password@10.0.0.25
---- Resolving host address...
---- 1 address found
lftp 10.0.0.25:~> set ftp:passive-mode off

If I do a 'cd' command, it logs in successfully.

Code:

---- Connecting to 10.0.0.25 port 21
<--- 220 Serv-U FTP Server v5.1 for WinSock ready...
---> FEAT
<--- 211-Extension supported
<---  CLNT
<---  MDTM
<---  MDTM YYYYMMDDHHMMSS[+-TZ];filename
<---  SIZE
<---  SITE PSWD;EXEC;SET;INDEX;ZONE;CHMOD;MSG
<---  REST STREAM
<---  XCRC filename;start;end
<---  MODE Z
<--- 211 End
---> CLNT lftp/3.0.5
<--- 200 Noted.
---> USER username
<--- 331 User name okay, need password.
---> PASS password
<--- 230 User logged in, proceed.
---> PWD
<--- 257 "/" is current directory.
---> CWD
<--- 250 Directory changed to /UPLOAD/cm152001/20oct2004
---> PORT 10,0,0,1,183,173
<--- 200 PORT Command successful.

However, it stays forever on the LIST command and finally says:

Code:

---> LIST
<--- 150 Opening ASCII mode data connection for /bin/ls.
<--- 426 Data connection closed, transfer aborted.
---- Closing data socket

I can cd without any problems, but when I try to ls, it takes forever and gives me the message above. Is there something I have to set up? I tried connecting using gftp and it also took forever trying to run the LIST command. Any ideas? Thanks for your time.

hw-tph 11-01-2004 05:14 AM

You're turning passive mode *off* in your client. ;)
Using set passive-mode on would probably be a better idea.


Håkan

LinuxGeek 11-01-2004 04:22 PM

Sorry. I meant that you can't connect to it using PASV mode. I modified the original post. Any ideas?

mousebubble 11-01-2004 11:44 PM

Are you behind a firewall? Looks like something is blocking the remote server's data port. That's the problem with active ftp... too bad you can't use passive.

LinuxGeek 11-02-2004 05:18 AM

Yes. I'm behind a firewall. I'm actually behind 2 firewalls. The first one is the default one that comes with Alcatel's SpeedTouch 510 and the other one is one I have on my machine. But all my firwall does is block any connection attempts to my machine. However, I'm able to initiate connections with anyone. I don't have problems doing things such as ftping files, using bit torrent, using eMule, etc.

mousebubble 11-02-2004 11:55 PM

afaik, until you do the ls you are still talking on port 21, which is a connection you initiated. once you do the ls command the server talks back from port 20 connecting to you on some port greater than 1024 (actually port 47021 from your first post).
Quote:

But all my firwall does is block any connection attempts to my machine.
in active ftp the data channel communication is a new connection attempt to your machine from the ftp server. not sure if this is your problem, but it gives you something to look at. if i were you i would check the firewall logs to see if you are blocking your own ftp.


All times are GMT -5. The time now is 08:23 PM.