LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2001, 04:35 PM   #1
thewoz
LQ Newbie
 
Registered: Oct 2001
Location: Canada
Distribution: RH 7.1
Posts: 5

Rep: Reputation: 0
Question very newbie ftp problem


I inherited a Red Hat 6.2 server that I only partially helped set up.. Now I'm on my own with a couple of very thick linux books and can't seem to get some things working. Telnet is up and running and not the problem.

FTP on the other hand I'm not having much luck with. I read alot about a ftpaccess file in /etc which I don't seem to have. I do have a hosts.allow file which I added all to. FTP is up and running and the line in httpd.conf is uncommented but for some reason I just cant log on. I am not using root just a regular account and I also tried anonymous and that didnt work either. I'm trying to connect from a windows machine and am seeing the comments from the ftp client

socket connected waiting for welcome message.

thats where it stops.. Nothing further.. I've searched and read as much as possible but things seem to referance files I dont have.. Do I have to create them or am I missing something???

Thanks for any help.
 
Old 10-12-2001, 08:01 PM   #2
ejtbrown
Member
 
Registered: Mar 2001
Location: Santa Maria CA USA
Distribution: RedHat 6.0 & RedHat 7.0
Posts: 36

Rep: Reputation: 15
The fact that you are able to get a login prompt from ftp indicates that the problem is NOT in the hosts.allow or hosts.deny files. I would recommend trying to FTP into your server from the command prompt on the server - i.e. take a console (or telnet) session on the server and ftp into the server from the server. I would also try this using both the ethernet (I'm assuming here that you're using ethernet) and your localhost loopback interface. The commands would look something like this:

[root@mr_server /]$ ftp mr_server.yourdomain.com

and

[root@mr_server /]$ ftp lo

This should tell you if it's a problem in networking or with the ftp deamon itself. There are two files that might me profitable to look at in careful detail. /etc/ftpaccess and /etc/ftphosts. Both of these can disallow a particular user or host to connect. If your are missing either of these, I can send you copies of mine (I'm running RH 6.0, but the files *should* be compatible).
 
Old 10-13-2001, 01:21 AM   #3
thewoz
LQ Newbie
 
Registered: Oct 2001
Location: Canada
Distribution: RH 7.1
Posts: 5

Original Poster
Rep: Reputation: 0
Hey thanks for the response.. I really appreciate your help.. I gave that a try and it tells me .....

421 service not available, remote server has closed connection.

I tried to ftp directly to my ip address because the host name is not set up yet.. will that make a differance?
 
Old 10-15-2001, 12:50 PM   #4
ejtbrown
Member
 
Registered: Mar 2001
Location: Santa Maria CA USA
Distribution: RedHat 6.0 & RedHat 7.0
Posts: 36

Rep: Reputation: 15
That sounds like either the FTP server isn't running, or that the port is closed. The FTP server should be part of inetd (but so is the telnet server - so if you can telnet into your system, inetd is running), so I would check and make sure inetd is running (it almost certainly is, but it never hurts to be sure, right?). You can check with this command:

ps -ax | grep -e "inetd"

The 'ps -ax' gives a complete listing of all the processes running on the system, the passes the list via the '|' to 'grep -e "inetd"' which looks for any lines that contain the text "inetd".

If inetd is running, then it's either not allowing FTP connections, or TCP Wrappers is blocking the connection. There should be a line in the file /etc/inetd.conf that looks something like this:

ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a

If this line starts with a '#', that means that the FTP service is disabled. If there's nothing infront of the line, that means that the FTP service is enabled. If you enable the service here, you'll need to reboot or restart the inetd service. To restart the inetd service, use these commands (from the console ONLY):

/etc/rc.d/init.d/inet stop
/etc/rc.d/init.d/inet start

If this does not clear up the problem, look at /etc/hosts.allow and /etc/hosts.deny. These files control the TCP Wrappers extensions that might be blocking the FTP port. The following is a simple hosts.allow:

ALL: 192.168.1.1
ALL: 192.168.1.2

And the following is a simple hosts.deny:

ALL: ALL@ALL, PARANOID

This assumes that the only hosts you want to allow to connect are 192.168.1.1 and 192.168.1.2. This configuration allows those two hosts to connect to any service that they want to, and denies everybody else. More info on these files and how to fine tune them can be found in the man pages (man hosts.allow, man hosts.deny)

Oh, and to answer your original question, using the IP address instead of the host name should be fine - in fact that is more likely to work in all cases than using the host name.
 
Old 10-15-2001, 11:13 PM   #5
phek
Member
 
Registered: Jul 2001
Location: California, US
Distribution: Slackware
Posts: 196

Rep: Reputation: 30
i'm pretty sure its not the problem but, you may want to check your /etc/services and make sure FTP TCP is uncommented using port 21, i'm not too sure if FTP UDP needs to be the same, but you might as well make sure that UDP is the same.
 
Old 10-16-2001, 10:48 AM   #6
thewoz
LQ Newbie
 
Registered: Oct 2001
Location: Canada
Distribution: RH 7.1
Posts: 5

Original Poster
Rep: Reputation: 0
Thumbs up Many Thanks to all

Hey All!!!

Great Forum.. Lots of Knowledgable and Helping people.

Thanks for all your replies.. I got FTP working last night and was happier than the proverbial pig!!!

YeeeeHaawwww..

Thanks again.
 
  


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
FTP Question for Newbie Tony33221 Linux - Software 3 09-10-2005 04:00 PM
Newbie seeking help with FTP cdawley4 Linux - Networking 2 07-28-2005 07:02 AM
ftp install **NEWBIE** surban99 Linux - Newbie 1 03-18-2005 03:48 PM
Help a newbie with ftp origzaphod Mandriva 2 10-24-2004 02:43 PM
NEWBIE ! Problem with Networking - CANT FTP Belize Linux - Networking 9 08-18-2003 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration