Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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???
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).
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):
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.