...

View Full Version : Trouble with FTP client under Linux/DOS



mlse
06-18-2005, 10:42 AM
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.

mlse
06-18-2005, 10:47 AM
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!) :mad: :mad: :mad:

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.

aleppax
11-18-2009, 03:56 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum