Re: FTP server strangeness


Subject: Re: FTP server strangeness
From: Rob Brandt (rbrandt@sbdsl.com)
Date: Fri Jan 18 2002 - 00:12:13 MST


>on 1/17/02 12:21 PM, rbrandt@sbdsl.com purportedly said:
>
> > Let me start by saying that I've learned only enough about Linux in
> > the last 9 months to be dangerous...
>
>Something very important to learn, although not making you less dangerous,
>is to understand the syslog mechanism. Unlike most other OSes, Unix based
>systems log just about everything that happens on your system. Most daemons
>will also use syslog for logging by default. Look at your logs--they will
>probably tell you exactly what's wrong, or at least give a good clue. They
>also allow your fellow list members to help you.

Yes, the logs are interesting. I went through them to see what was
reported by wuftp when the trouble started. When I tried to log in it said:

Jan 16 22:40:31 6116 ftpd[922]: lost connection to 10.1.20.150 [10.1.20.150]
Jan 16 22:40:31 6116 ftpd[922]: FTP session closed

I had repeatedly tried to login, and these lines occurred every time. But
keep in mind that I have removed wu-ftp at this point, so it's not the
problem at the moment, although I might have to come back to it.

> > site; I used v 1.2.4-1. I guessed that since I don't use inetd that
> > I would have to manually enter the settings for ProFTP in xinetd
> > instead. So for the ftp entry in xinetd I changed the command line
> > to /usr/sbin/in.proftpd instead of in.ftpd and hoped for the best.
>
>Hoping doesn't work. Verifying where in.proftpd is, and making sure your
>invocation calls it at its real location, works. inetd is unnecessary to run
>proftpd. It can run in daemon mode with a single one line configuration
>command. In any case, if you have no daemon running, it hasn't started. That
>can mean many things. 1) Did you HUP inetd after configuring? 2) Is WU-FTPD
>running in daemon mode? 3) did you try netstat -an to see if there is an FTP
>server listening? What do your logs say.

Often my hopes have paid off, but that's neither here nor there. I've
determined that in.proftpd is a link that points to /usr/sbin/proftpd,
xinetd now points directly to it. Also: 1) Yup, I HUP. 2) Well, I've
removed all traces of it I could find. I sought the files based on the
file list from an RPM, although I couldn't use an RPM to install it
originally, since the one that came with YDL 2.0 didn't work. 3) I see no
references to FTP, wu-ftp, or ProFTP listed in the results of netstat
-an. There is a line that says:

tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN

and ftp is on port 21, so I interpret this to say that something is listening.

> > I'm not even sure how to diagnose. I looked through my list of
> > running processes (using WebMin) and there do not appear to be any
> > ftp daemons running while I try an log in.
>
>Hopefully you have some ideas now. Another tip: learn how to use your Linux
>command-line tools. Graphical tools like webmin or linuxconf should only be
>used by those who know how to do it the hard way, but choose not to. Already
>you see that your tool of choice does not help you much.

I wouldn't think of disputing the importance of command line, having
started my computing journey on a Prime V mainframe in 1982. But
personally I find learning with Webmin immensely helpful in learning the
jargon and preventing typos and syntax errors. If I try something and it
doesn't work, I know that I haven't "gotten it" yet, as opposed to doubting
whether I should have used a colon or a comma, a \ instead of a /, or
whether the given item needs a trailing slash at the end. When something I
do DOES work, I can look at the conf file and see what Webmin did. And it
often has clear, concise online help. I don't shy away from doing things
the hard way either; witness the subject system itself. It's my first
Linux system and I got it running on an old 6116 CD nubus Mac that isn't
even officially supported by YDL and I had to use a 3rd party kernel. Most
of the RPMs I wanted to use didn't work, and had to compile my own. And I
used Webmin extensively in doing it. The problem is that I did all of this
6 to nine months ago, and have hardly had to touch it since then. I've
forgotten a great deal since then, and that still probably would have
happened had I used the command line exclusively.

>Also keep in mind that default configurations for newly installed software
>may not work. They may also have severe security issues, such as anonymous
>access for FTP servers. They may also assume certain configurations in the
>system or with other software, which may or may not be in place.

Point taken.

Here's the current status: Wu-FTP removed as far as I can tell, ProFTP
installed, still can't log in. When I try, the log now says:

Jan 17 22:08:20 6116 proftpd[842]: 6116.csd-bes.net - Failed binding to
0.0.0.0, port 21: Address already in use
Jan 17 22:08:20 6116 proftpd[842]: 6116.csd-bes.net - Check the ServerType
directive to ensure you are configured correctly.

So my interpretation is that there's still something from wu-ftp left over
that's using port 21. But what, where, and how?

Thanks for your help, suggestions, and chiding...

Rob



This archive was generated by hypermail 2a24 : Fri Jan 18 2002 - 00:27:32 MST