From owner-freebsd-questions@FreeBSD.ORG Wed Feb 18 02:26:22 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02D7D16A4CE for ; Wed, 18 Feb 2004 02:26:22 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CE8B43D1F for ; Wed, 18 Feb 2004 02:26:21 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i1IAQDoH067883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Feb 2004 10:26:13 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i1IAQD5n067882; Wed, 18 Feb 2004 10:26:13 GMT (envelope-from matthew) Date: Wed, 18 Feb 2004 10:26:13 +0000 From: Matthew Seaman To: Marty Landman Message-ID: <20040218102613.GB67139@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Marty Landman , Wayne Pascoe , freebsd-questions@freebsd.org References: <6.0.0.22.0.20040217111500.049a6db0@pop.face2interface.com> <20040217162446.GB77332@marvin.penguinpowered.org> <6.0.0.22.0.20040217113548.04cea110@pop.face2interface.com> <20040217182542.GC59848@happy-idiot-talk.infracaninophile.co.uk> <6.0.0.22.0.20040217134443.01b80f88@pop.face2interface.com> <20040217202718.GA61088@happy-idiot-talk.infracaninophile.co.uk> <6.0.0.22.0.20040217155445.05af7e48@pop.face2interface.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7iMSBzlTiPOCCT2k" Content-Disposition: inline In-Reply-To: <6.0.0.22.0.20040217155445.05af7e48@pop.face2interface.com> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: Wayne Pascoe cc: freebsd-questions@freebsd.org Subject: Re: can't connect to ftp server X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2004 10:26:22 -0000 --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 17, 2004 at 04:34:04PM -0500, Marty Landman wrote: > Something related which I'd like to understand Matthew. I don't know what= =20 > the base install ftpd is as >=20 > # /usr/libexec/ftpd -V > ftpd: illegal option -- V > ftpd: unknown flag -V ignored > # /usr/libexec/ftpd -v > # >=20 > However I installed wu-ftpd from the ports yesterday and it's in=20 > /usr/local/libexec/ftpd so I changed /etc/inetd.conf accordingly and then= =20 > did >=20 > kill -HUP `cat /var/run/inetd.pid` >=20 > and for laughs (or developing the understanding now that navigating unix = is=20 > similar to driving in New Jersey) I tried ftp'g into my box w/o first=20 > (starting) inetd and I got in, and ps -ax showed inetd running as well. Y= et=20 > I don't see in the man pages for inetd(8) where any of these options impl= y=20 > automatic restart. There's two ways of running ftpd(8) -- either out of inetd(8) or as a standalone process. Some software packages will do one, some will do the other and several will do both given the correct configuration. The system ftpd(8) assumes that it is going to be run out of inetd(8) -- which means that inetd(8) is going to do all the grunt work of receiving any incoming connection and then fire up ftpd(8) with it's standard in- and outputs already connected to the network socket. If you try and start a daemon designed to work with inetd from the command line, as you showed, it will either sit there waiting for input on stdin or close down immediately. Most of the other FTP server ports are intended to run standalone -- that is the ftpd process runs continually and manages all of the incoming connections to port 21 itself. Generally running these daemons from the command line will look as if they just shut down immediately, but actually what happens is that they 'daemonized' themselves: ie. spawn another copy of themselves, which isn't associated with any terminal (plus various other changes -- see daemon(3), setsid(2) for details). You won't be able to run both inetd(8) providing FTP service and a standalone FTP daemon -- only one process at a time can take control of the FTP port on your system. However, most system level programs like this don't print out error messages on the command line -- rather, they use syslog(3) to write the errors into the system log files. However there isn't any obvious notification to you typing at the console if this sort of thing occurs -- you'll just find that some process you expected to be running isn't and have to go hunting through the log files to work out why. Running ftpd out of inetd is generally appropriate for low-traffic FTP sites or sites where FTP access is only required occasionally. A stand-alone FTPd setup would be more appropriate for a machine tasked with being a full-time FTP server. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --7iMSBzlTiPOCCT2k Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAMz3FdtESqEQa7a0RAkPbAJ9HJFYbPk9Ac+cQ43jf30fS7DkSlwCeLAfR kDqiNM40tzOldbm11R+OPJA= =ki0w -----END PGP SIGNATURE----- --7iMSBzlTiPOCCT2k--