#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    353
    Rep Power
    50

    command line ftp problem


    A few years ago I wrote an FTP script, called from a .bat file, which moved a bunch of files from my local machine to a website hosted at Godaddy. It worked fine.

    I need to do it again now, and also for a Godaddy site, but it isn't working now. I used the same script from the first time, just changing login creds and files/locations. It isn't working, and I'm certain the problem is at Godaddy's end. I tried it on two different Godaddy servers with the same results.

    Here's the script with fake IP and creds:

    open 0.0.0.0
    joeuser
    joepassword
    cd test
    mput *.csv
    quit


    Here's how it's called from the .bat file:

    ftp -s:script.txt -i

    Here's the resulting log. You can see the server telling me I'm doing everything right. Then it can't connect to a couple of ports, and it just snags up after the last line and goes dead. If I go to the destination directory with Filezilla, Some of the files show up with 0 byte lengths, so it's clear my script got me where I was supposed to go.

    Can anybody suggest changes to my script, or to the switches in the line where I'm calling it, that might bypass whatever's going wrong at Godaddy? Thanks for reading...

    ftp> Connected to 0.0.0.0.
    open 0.0.0.0
    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    220-You are user number 8 of 500 allowed.
    220-Local time is now 14:07. Server port: 21.
    220-This is a private system - No anonymous login
    220 You will be disconnected after 3 minutes of inactivity.
    User (50.63.119.1none)):
    331 User joeuser OK. Password required

    230 OK. Current restricted directory is /
    ftp> cd test
    250 OK. Current directory is /test
    ftp> mput *.csv
    200 PORT command successful
    425 Could not open data connection to port 57203: Connection timed out
    200 PORT command successful
    425 Could not open data connection to port 57278: Connection timed out
    200 PORT command successful
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    938
    Rep Power
    281
    the following 2 lines leads me to believe its firewall related.
    Code:
    425 Could not open data connection to port 57203: Connection timed out
    425 Could not open data connection to port 57278: Connection timed out
  4. #3
  5. Headless Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,972
    Rep Power
    9647
    FTP has two modes for transferring stuff: active (default) and passive. Active mode has the server trying to connect to you, passive mode has you connecting to the server.

    Windows's FTP client doesn't support passive mode. I don't know FileZilla but you might be able to script it instead.

IMN logo majestic logo threadwatch logo seochat tools logo