Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts

    Question Trouble with FTP client under Linux/DOS

    Hi,

    I am trying to FTP to my remote webhost account from my Linux machine and also under DOS (with no joy!).

    I know that the FTP connection works because I have tried a couple of FTP clients under Windows XP (namely WISE-FTP 3.0 and FTP Commander 7.33) and I can happily transfer files back and forth, etc.

    However, when I try to connect use the ftp command under DOS, I get the following behaviour:

    (cut-and-paste job, with the sensitive data removed):


    C:\temp>ftp
    ftp> open XXXXXX.co.uk
    Connected to XXXXXX.co.uk.
    220 FTP Server ready.
    User (XXXXXX.co.uk: (none)): YYYYYY
    331 Password required for YYYYYY.
    Password:
    [I type in my password, which I know to be correct!]
    530 Login incorrect.
    Login failed.
    ftp>


    Under Linux (Redhat 9.0), I get even more alarming behaviour, as follows:

    When I try straight FTP with no .netrc, I get the same as above, but only with the "none" bit replaced by my Linux login name (as one would expect).

    When I try the command "ftp -n" (which turns off auto-logging), I get the following behaviour:


    [mike]$ ftp -n
    ftp> open XXXXXX.co.uk
    Connected to XXXXXX.co.uk (
    [IP Address]).
    220 FTP Server ready.
    [The whole caboodle just hangs here for about 30 seconds]
    ftp>
    [Then it returns to the FTP prompt with no error reports - I.e. the server has silently kicked me out!]


    I then tried to put some stuff in the .netrc file as follows:

    either:
    default login YYYYYY

    or:
    machine XXXXXX.co.uk login YYYYYY

    And I run ftp with no options. I get the following behaviour:


    [mike]$ ftp
    ftp> open XXXXXX.co.uk
    [The whole thing now hangs here for about 20 seconds]
    Connected to XXXXXX.co.uk (
    [IP Address]).
    220 FTP Server ready.
    [The whole thing now hangs here for about 30 seconds]
    421 Login Timeout (30 seconds): closing control connection.
    Login failed.
    No control connection for command: Illegal seek
    ftp>


    I then tried to add my password to the .netrc file and the results were even worse! As follows:


    [mike]$ ftp
    ftp> open XXXXXX.co.uk
    Connected to XXXXXX.co.uk (
    [IP Address])
    220 FTP Server ready.
    Error - .netrc file not correct permissions.
    Remove password or correct mode (shoule be 600).
    [The whole thing just hangs here for evermore - or until I hit CTRL-C!]


    So the upshot is that I know the FTP connection works, but I can't get it to work in either Linux or DOS - there's a lot to go on here and I'm sure it's a simple case of me not doing something trivial (which I don't know about) - So any help would be much appreciated!

    TIA,
    Mike.
    Die Welt ist ein Irrenhaus und hier ist die Zentrale!

  • #2
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    ADDENDUM:

    I just tried the .netrc method with the password in the .netrc file again, but this time I did a chmod 600 ~/.netrc - and now I get the same error as I do when I run ftp with no password in the the .netrc file and I enter it manually! (i.e. I get the 421 timeout error!)

    MORE ADDENDUM:

    I have got FTP to work fine under DOS now, *BUT* I have been trying to get this thing to work for a while now under Linux. When I switch on debugging (using -d) under Linux, the FTP connection always seem to fail upon client SYST transaction (I have tried running FTP in both Active and Passive modes and the result is always the same!). I'm still baffled! s-ftp fails too.
    Last edited by mlse; 06-19-2005 at 11:07 AM.
    Die Welt ist ein Irrenhaus und hier ist die Zentrale!

  • #3
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    4 yearls later, I have the same problem. Exactly the same.
    Did you manage to solve it?
    I've spent several hours to search the web for a solution, but found nothing.
    The admin of the ftp server where I need to connect doesn't have a clue about this problem.

    how did you got FTP to work under DOS?

    I've also sniffed the entire packet transaction with wireshark, and found no differences between DOS/linux and windows.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •