Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2001 10:40:15 -0500
From:      Gunther Schadow <gunther@aurora.regenstrief.org>
To:        Anastasia Leventi-Peetz <leventi@fgan.de>
Cc:        users@ipv6.org, users-ship@ipv6.org, freebsd-net@freebsd.org
Subject:   Re: ftpd-BSD and standalone
Message-ID:  <3B30C3DF.8051A0A0@aurora.regenstrief.org>
References:  <200106201338.PAA03913@melle.ffm.fgan.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Anastasia Leventi-Peetz wrote:
> 
> hello Gunther,
> 
>  thanks a lot for the interesting mail.
> I don't do IP filters that's for sure. I am astonished that
> on the bieringer www page (www.bieringer.de) the standalone modus
> is recommended! I run the IPv6 ftpd of Free-BSD (downloaded and
> compiled from the bieringer page) installed on the SuSE distribution.
> The line in the inetd.conf file of SuSE Linux looks like:

Hmm, sounds very complex and self-stiched. Why don't you just
use FreeBSD out of the box? I don't know what this bieringer
thing is supposed to do. If they have modified the source code
of the ftpd, anything can happen. But the diagnosis to your
problem is pretty straight forward:

> ftp stream tcp6 nowait root /usr/sbin/tcpd ftpd-BSD -D -6

woops, tcp-wrappers (tcpd) take 'em out, they confound the
problem.

> Of course ftpd-BSD is in directory /usr/sbin/

hmm, even that I wouldn't bet on being found by the wrappers.
Check you syslog dump (/var/log/messages or /var/log/ftp or
anything in /var/log) for warnings and errors.

> The above thing fails so that I start standalone the daemon with the above switches.

The two reasons why it may work then is 

- you don't do tcp-wrappers if you just say ftpd-BSD -D -6

and 

- ftpd-BSD is in your PATH

> Now the corresponding line in Free-BSD is

> ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l

yes, no tcp wrappers. And about the options RTFM:

-D makes ftpd to become a daemon itself. This is *not* what you
   want when you let inetd manage the services. So, take that -D
   out.

-l maked ftpd log accesses, you do want that no matter what (and
   it helps in debugging.)

-6 is only an issue when -D is specified, i.e., no need when 
   using inetd.

> I have tried both options: above line with tcp6 and ftpd -D -6
> or only tcp and ftpd -D -6 but I couldn't start the daemon with inetd.

Try *both* of the following lines in inetd.conf

ftp stream tcp  nowait root /usr/sbin/ftpd-BSD ftpd -l
ftp stream tcp6 nowait root /usr/sbin/ftpd-BSD ftpd -l

that's all you need. Notice that the 6 versus 4 issue is handled by 
inetd (tcp vs. tcp6) and you need one inetd.conf line for each. Having
both makes it easier to distinguish whether you have an IPv6 problem
somewhere (but do use numeric addresses for testing, to be sure you
use the right IP version.)

> (It doesn't seem to be started from tcpd like in SuSE case).
> I do have the ready ipv6 able daemon.
> Then I started it manually /usr/libexec/ftpd -D -6 -a interfacename

Now I'm confused. There is something wrong about how you named
your files and in which directory you put them. Before you said
/usr/sbin, now you have /usr/libexec, before you said ftpd-BSD
now you say just ftpd. On FreeBSD this is /usr/libexec/ftpd.
Be sure you grab the right file. And make sure you give the full
path in inetd.conf. Also, never use the -D option with inetd.conf;
it can't work! With -D ftpd tries to bind(2) another socket and
since it's already bound by inetd, it'll fail right away. Also,
if you use nowait in inetd and call something that doesn't handle
the connection, you'll get inetd cycling through calling ftpd
again and again. If this goes on too often, inetd figures that
it's not gonna work and shuts down the service alltogether. This
is what happened in your case.

-Gunther

-- 
Gunther Schadow, M.D., Ph.D.                    gschadow@regenstrief.org
Medical Information Scientist      Regenstrief Institute for Health Care
Adjunct Assistant Professor        Indiana University School of Medicine
tel:1(317)630-7960                         http://aurora.regenstrief.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B30C3DF.8051A0A0>