Date: Sat, 28 Oct 2000 10:30:03 -0500 From: "Jeremy Falcon" <jeremy@intersurf.com> To: <cjclark@alum.mit.edu> Cc: <questions@FreeBSD.ORG> Subject: Re: problem starting ftpd Message-ID: <001f01c040f3$f1e2b110$0101a8c0@win2k> References: <004a01c03f48$7b9c7420$0101a8c0@win2k> <20001026234827.B75251@149.211.6.64.reflexcom.com> <007301c0400d$508219f0$0101a8c0@win2k> <20001027132234.A42242@149.211.6.64.reflexcom.com> <013a01c040af$badd1780$0101a8c0@win2k> <20001028004432.G75251@149.211.6.64.reflexcom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I can ftp and telnet to 127.0.0.1. Go figure. Jeremy Falcon ----- Original Message ----- From: "Crist J . Clark" <cjclark@reflexnet.net> To: "Jeremy Falcon" <jeremy@intersurf.com> Sent: Saturday, October 28, 2000 2:44 AM Subject: Re: problem starting ftpd > On Sat, Oct 28, 2000 at 02:21:44AM -0500, Jeremy Falcon wrote: > > [snip] > > > > First, what are you trying to do? If you want to run an independent > > > ftpd daemon, you have to disable ftpd in inetd.conf. Only one program, > > > either an ftpd daemon or inetd, can be listening on port 21 at a time. > > > > I'm trying to get ftpd to run via inetd; no daemon. With no ftpd running > > (ps -aux | grep ftpd returns nothing) I still get... > > > > # /usr/libexec/ftpd > > Oct 28 01:21:16 gateway ftpd[276]: getpeername (/usr/libexec/ftpd): Socket > > operation on non-socket > > If you run ftpd(8) from the command line with no '-D' that is the > error you will get. ftpd by default expects to be run from > inetd(8). It expects to get the connection handed off to it by inetd > rather than listening on 21. The fact this does not occur has this odd > failure mode. > > If you want to run ftpd from inetd, it is enabled by default, with a > line like, > > ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l > > In inetd.conf(5). > > > I know from my sockets programming experience (primarily Winsock, but it's > > based on BSD Sockets) that getpeername() is used to query the remote > > socket's name on a connected socket (something you need to communicate). > > So, my question is why is their no socket connection being created? Like > > you said, maybe it has to do with the ports not being available after all? > > I wonder if the port not actually beng available will stop a socket from > > being named -- I'll have to look that one up. > > Well, I have not looked at the source recently, but here is my guess. > When run from inetd, inetd passes the connected socket as stdin to > ftpd. When you run ftpd from the command line, the stdin is not a > socket, thus the error. > > > FYI, I really appreciate your assistance and look forward to a response. > > I am not sure why telnet or ftp is not working properly from > inetd. What happens if you get on the machine and, > > $ telnet 127.0.0.0 > > Or, > > $ ftp 127.0.0.1 > > If that works the problem is not likely with inetd. > -- > Crist J. Clark cjclark@alum.mit.edu > 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?001f01c040f3$f1e2b110$0101a8c0>