Date: Sat, 7 Dec 2002 14:27:51 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-questions@FreeBSD.ORG Subject: Re: ftp server problem Message-ID: <20021207142751.GA1645@happy-idiot-talk.infracaninophi> In-Reply-To: <1039265243.6618.23.camel@localhost.localdomain> References: <1039265243.6618.23.camel@localhost.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 07, 2002 at 03:47:23AM -0900, Damien Hull wrote: > I run a FreeBSD FTP server. For some reason it works only some of the > time. Here is what happens: > > 1. I can log into the FTP server from any where > 2. I can transfer files from any where > 3. I can CD into any directory I want > 4. I can not use the ls command from some locations. > > Does anybody know how to fix this problem? I would like to be able to > see what I have when I'm on my ftp server. Hmmm... There are two possibilities I can think of that might cause these symptoms. You don't say exactly how the failure of the 'ls' command manifests itself. i) It's a "feature" of the particular ftp clients that you happen to use at those troublesome locations that they don't provide the 'ls' command to get a directory listing of the server. In that case there should be an alternative command, like 'dir' which does much the same thing. In this case your ftp client will presumably emit some sort of error message. It's almost inconceivable that any ftp client with a unix heritage would fail to provide a 'ls' command in the ftp client, but stranger things have happened on the 'net. ii) You're running into active/passive ftp mode breakage. In this case, what you'll see when you issue a 'ls' command in the client is you session just hangs and you have to quit to get back to sanity. Contrary to what you imply above, you wouldn't be able to up- or down- load files in this case, either. The ultimate cause of this problem is a bad interaction between the way the FTP protocol works and being able to write a reasonable firewall filter set (usually to protect the *client* machine you're ftp'ing from). I wrote quite a detailed explanation of what exactly happens in: http://groups.google.co.uk/groups?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&safe=off&selm=fa.p0jgo8v.2hc7b2%40ifi.uio.no Probably what you need to do is use passive mode ftp from the troublsome locations. You can test this by using a web browser from the problematic location to look at your ftp server --- web browsers happen to always use passive mode ftp, and if you can see your site OK, that confirms what the problem is. Setting a command line ftp client to use passive mode varies from the sublime --- eg. just use the 'passive' command to toggle between active and passive mode in the FreeBSD client, or set FTP_PASSIVE_MODE=yes in the environment, or use the 'pftp' passive ftp client --- to the gor-blimey --- as far as I can tell, there's no way to make the Solaris standard ftp client use passive mode, and you'ld have to install something like ncftp instead (ports/ftp/ncftp3). Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK 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?20021207142751.GA1645>