LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-19-2005, 04:25 AM   #1
mlse
LQ Newbie
 
Registered: Feb 2004
Posts: 15

Rep: Reputation: 0
Problems with FTP client under RedHat 9.0


Hi,

I am trying to FTP to my remote webhost account from my Linux machine (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.

When I try to connect using the ftp command under DOS, I get the following behaviour, which is excatly what I was hoping for:

(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]
230 User XXXXXX logged in.
ftp>
[bingo]


Under Linux (Redhat 9.0), I get 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

or:
machine XXXXXX.co.uk login YYYYYY password ZZZZZZ

And I run ftp with no options, with the .netrc file in 600 mode. 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>


Note that I've also tried S-FTP (which also fails), and I've tried normal ftp in both active and passive modes. when I turn on debugging, ftp always seems to fail at the SYST command.

Incidentally, I can browse the 'net quite happily under RedHat 9.0 - so there's no problem with my network connection!

Note also that I have tried to SSH into the server (it does support SSH and I have successfully SSH'd in from my Windows machine) - but under Linux, it just hangs indefinitely after I have entered my password. I have a feeling that the SSH and FTP problems may be related!

So the upshot is that I know the FTP connection works, but I can't get it to work in either Linux or DOS - 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.
 
Old 06-19-2005, 06:34 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 198Reputation: 198
Can you even ping this host from Linux? Or run a traceroute? Seems more like a communication problem with the remote host rather than FTP or the like.. perhaps something like DNS resolution...
 
Old 06-19-2005, 06:48 AM   #3
mlse
LQ Newbie
 
Registered: Feb 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Ping works fine and traceroute works fine .... (both with I.P. Address and URL).

Incidentally, when I run traceroute, after a certain number of hops (15 in this case), the hosts are displayed as "* * *" rather than as URLs with IPs ... (do you suppose that is relevant?)

Note that I can browse the net absolutely fine (I am writing this reply to you on my Linux PC!).
 
Old 06-19-2005, 07:28 AM   #4
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
Quote:
Originally posted by mlse
Ping works fine and traceroute works fine .... (both with I.P. Address and URL).

Incidentally, when I run traceroute, after a certain number of hops (15 in this case), the hosts are displayed as "* * *" rather than as URLs with IPs ... (do you suppose that is relevant?)

No the * mean that the router does not send back ICMP Time Exceeded packages. Many networks do that for security reasons.

Quote:
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).
This is the default username and will be used if you just press enter. Doesn't it still give you a prompt to enter a login name?

Last edited by perfect_circle; 06-19-2005 at 07:30 AM.
 
Old 06-19-2005, 07:52 AM   #5
mlse
LQ Newbie
 
Registered: Feb 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Yes, indeed it does!

Do you reckon you might know a solution to my FTP problem?

(waits hopefully ...)
 
Old 06-19-2005, 11:10 AM   #6
mlse
LQ Newbie
 
Registered: Feb 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Right.

This get wierder by the minute ... I have written a noddy client app in C, compiled it up and run it, and it succesfully makes a connection with the remote server!
 
Old 06-20-2005, 03:43 AM   #7
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
You will need to narrow down your unknown variables..

If it's ok with your C prog and a DOS client, I would question the ftp client..
Does it work using another ftp client, eg via your browser, with gftp, wget, telnet etc?

Some clients use dns rather weirdly. Try adding the url and ip to /etc/hosts
What hostname does your Linux box use? Is it in fqdn format? Does it reverse resolve?
Do you have the auth port 135 rejected or dropped or tcp-reset in your firewall?
Dropping will add a very long delay waiting for it to timeout.
Rejecting gives a response to the remote end.

There will be differences between different client implementations for sure.
 
Old 06-20-2005, 04:00 AM   #8
mlse
LQ Newbie
 
Registered: Feb 2004
Posts: 15

Original Poster
Rep: Reputation: 0
I never knew that there was so much to this networking stuff! Lol! Anyway, thanks for those pointers, I will investigate ... and get back to you if I can't fix it!

Thanks,
Mike.

P.S.:
FYI, this is what I've found (in a nutshell):
It doesn't work with any ftp client, command-line or browser based, in active or passive mode, which suggests that it is something external to the client itself.

It still doesn't work with any client even when I (briefly) turn off the firewall.

I don't think it's a DNS problem, the same error manifests itself if I use the URL or the IP.

Last edited by mlse; 06-20-2005 at 04:04 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with ftp client eastcoasteh Linux - Newbie 2 10-24-2005 02:04 PM
Active FTP Client Problems Sarcha Linux - Networking 2 06-29-2005 03:59 PM
Problems with ftp-client Ephracis Linux - Software 0 11-04-2004 07:48 AM
Graphical FTP client on Linux Redhat 8? E-Rick Linux - Networking 2 10-19-2004 12:20 PM
Connecting to my fresh install of RedHat 8 with FTP client stayathomemom Linux - Newbie 1 02-04-2003 02:10 PM


All times are GMT -5. The time now is 09:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration