Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: perl: FTP using cgi not working but FTP s/w works well

by need_help21 (Novice)
on Nov 21, 2007 at 03:13 UTC ( [id://652053]=note: print w/replies, xml ) Need Help??


in reply to Re: perl: FTP using cgi not working but FTP s/w works well
in thread perl: FTP using cgi not working but FTP s/w works well

The error i believe occurs at the place prior to attempting the "put" command. Even the turning off the Passive mode (by removing $ftp-> pasv() from the code) doesn't work and result is same. The file that was supposed to be transferred is created at the destination while executing this code but with ZERO bytes and no data is transferred. I even tried to connect the remote machine manually (instead of CGI code), i am able to login, but the file is not getting transfered. But strange to me that while using a software (Filezilla) i am able to FTP the files easily.
  • Comment on Re^2: perl: FTP using cgi not working but FTP s/w works well

Replies are listed 'Best First'.
Re^3: perl: FTP using cgi not working but FTP s/w works well
by erroneousBollock (Curate) on Nov 21, 2007 at 03:36 UTC
    As a few of us said in the CB, you're likely suffering from the ftp-data port being blocked (incoming to your web server), combined with the FTP server not implementing PASV. If that's true nothing you change in your code will make it work.

    Even if your desktop PC receives ftp-data connections OK, that's no reason to believe that your network administrator has allowed the same for the web server.

    Either have your network administrator sort it out, or use another protocol. (eg: scp, webdav, rsync, etc)

    -David

Re^3: perl: FTP using cgi not working but FTP s/w works well
by tuxz0r (Pilgrim) on Nov 21, 2007 at 03:44 UTC
    As erroneouBollock noted, you need to bring this up with your administrator, I wasn't aware this had been brought up in the CB. If ftp'ing from your script and the command line don't work, I don't think using Filezilla would make a difference. Try using 'scp' to get the file their instead if ftp isn't working for you:
    $ scp -C localfile username@remotemachine:/remote/file/location/

    ---
    echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'
    Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://652053]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 03:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found