From owner-freebsd-questions Sat Dec 7 6:28: 8 2002 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 2B67C37B404 for ; Sat, 7 Dec 2002 06:28:06 -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 C236E43E9C for ; Sat, 7 Dec 2002 06:28:04 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id gB7ERu46001866 for ; Sat, 7 Dec 2002 14:27:56 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id gB7ERpH3001865 for freebsd-questions@FreeBSD.ORG; Sat, 7 Dec 2002 14:27:51 GMT Date: Sat, 7 Dec 2002 14:27:51 +0000 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Subject: Re: ftp server problem Message-ID: <20021207142751.GA1645@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: <1039265243.6618.23.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1039265243.6618.23.camel@localhost.localdomain> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-2.7 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_03_05, USER_AGENT,USER_AGENT_MUTT version=2.43 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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