LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   RH8 with perl ftp across firewall (https://www.linuxquestions.org/questions/linux-networking-3/rh8-with-perl-ftp-across-firewall-260566/)

mairot 11-29-2004 12:44 PM

RH8 with perl ftp across firewall
 
Hello,

i'm doing ftp with perl across a firewall. Before transfering files, i want to list them. But in RH8, my ftp connection is passive mode on and i do not know , in my perl script how to turn it off.

Manually i get this :

ftp xxx.xx.xx.xx

230 User toto logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> passive
Passive mode off.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls (yy.yy.yy.yy,abcd).
total 856
drwxr-xr-x 2 toto users 843776 Nov 29 13:38 dir_to_list
226 Transfer complete.

if i do not invoque passive i got this :

227 Entering Passive Mode (xxx,xx,xx,xx,aa,bb)
ftp: connect: Connection refused

Since passive on is the default in RedHat8, how can i turn it off in my script.

i've tried ftp->pasv() but it doesn't seem to work. I'm still not able to list the directory.

Is there a way to tell perl not sending the passive command so i will connect in passove mode off?

Merci

david_ross 11-29-2004 02:37 PM

Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

The original is here:
http://www.linuxquestions.org/questi...hreadid=260609


All times are GMT -5. The time now is 02:54 AM.