Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2001 20:28:30 +0300
From:      Giorgos Keramidas <charon@labs.gr>
To:        S?ren Neigaard <neigaard@e-box.dk>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: ftp server - again
Message-ID:  <20010920202829.B23202@hades.hell.gr>
In-Reply-To: <2021273499.20010920150316@e-box.dk>
References:  <NCBBIAMNAKDKFJIIGNPKKEMDGBAA.bb@wbtsystems.com> <4420765449.20010920145448@e-box.dk> <2021273499.20010920150316@e-box.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--lEGEL1/lMxI0MVQ2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

S?ren Neigaard <neigaard@e-box.dk> wrote:
> Hey I found a file /etc/rc.conf where inetd was turned off :) So I
> solved this by my self (maybe I'm lerning)

You can either start ftpd from inetd, as you discovered, or standalone.
Note that you can either start ftpd from inetd, or standalone, but not both.

In fact, the manpage of ftpd suggests that you start ftpd as standalone, on
busy sites.  From ftpd(8) one can quote:

     -D      With this option set, ftpd will detach and become a daemon,
             accepting connections on the FTP port and forking children pro-
             cesses to handle them.  This is lower overhead than starting ftpd
             from inetd(8) and is thus useful on busy servers to reduce load.

To start this automagically at boot time, you can put a custom script in
/usr/local/etc/rc.d that starts ftpd.  It has to understand `start' and `stop'
/options, at the very least, so it could be something like:

	#!/bin/sh

	case $1 in
	start)
		/usr/libexec/ftpd -D && echo -n ' ftpd'
		;;
	stop)
		/usr/bin/killall ftpd >/dev/null 2>&1 && echo -n 'ftpd'
	*)
		echo "usage: `basename $0` {start|stop}" 1>&2
		exit 1
		;;
	esac

You can always add more options to the line that calls /usr/libexec/ftpd, but
you should really read and try to understand the manpage to select the options
that you want to add there--if you haven't read it already, that is.

- giorgos

--lEGEL1/lMxI0MVQ2
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)

iD8DBQE7qic9nx3zGsay9fwRAsk9AKDMMhmUyEC4Xlr1vpIKZrfIchnfIwCgkL53
12TGjOXowBGLsOz1KrvpFRs=
=EgQ1
-----END PGP SIGNATURE-----

--lEGEL1/lMxI0MVQ2--

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010920202829.B23202>