From owner-freebsd-questions@FreeBSD.ORG Tue Dec 16 10:38:34 2003 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 19EE016A4CE for ; Tue, 16 Dec 2003 10:38:34 -0800 (PST) Received: from lv.raad.tartu.ee (lv.raad.tartu.ee [194.126.106.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A58843D39 for ; Tue, 16 Dec 2003 10:38:31 -0800 (PST) (envelope-from toomas.aas@raad.tartu.ee) Received: Message by Barricade lv.raad.tartu.ee with ESMTP id hBGIcTLe005322 for ; Tue, 16 Dec 2003 20:38:29 +0200 Message-Id: <200312161838.hBGIcTLe005322@lv.raad.tartu.ee> Received: from INFO/SpoolDir by raad.tartu.ee (Mercury 1.48); 16 Dec 03 20:38:30 +0200 Received: from SpoolDir by INFO (Mercury 1.48); 16 Dec 03 20:38:12 +0200 From: "Toomas Aas" Organization: Tartu City Government To: questions@freebsd.org Date: Tue, 16 Dec 2003 20:38:07 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Priority: normal Subject: fetch / wget problem 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: Tue, 16 Dec 2003 18:38:34 -0000 Hi! I'm trying to write a script which gets a file from remote FTP server. The FTP username contains dots and this cannot be changed. There are two firewalls involved, one running on the same server where I'm doing this (ipfilter, using ipnat ftp proxy) and one between this server and the FTP server. The FTP server itself is in internal network using RFC1918 addresses and a port in firewall is being forwarded to this server. I think that firewalls are configured correctly, because I can successfully get the file manually, using the 'ftp' command. However, when I try this command: fetch ftp://user.name:password@server.mydomain.com/directory/file.ext I get an error message: fetch: ftp://user.name:password@server.mydomain.com/directory/file.ext: Host not found. I suspect that fetch, seeing a dot in username, attempts to 'resolve' the entire URL, instead of just the part after @. Is there a known workaround to this? I also tried wget, which succeeds to connect, but then, no matter what I do, insists on using passive mode. wget ftp://user.name:password@server.mydomain.com/directory/file.ext Connecting to server.mydomain.com[12.34.56.78]:2100... connected. Logging in as user.name ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /directory ... done. ==> PASV ... and then the process just hangs. I suspect it would work if I could somehow tell wget to NOT use passive mode. I initially had FTP_PASSIVE_MODE environment variable set, but removing this didn't affect wget's behaviour. Any ideas? -- Toomas Aas | toomas.aas@raad.tartu.ee | http://www.raad.tartu.ee/~toomas/ * RUNTIME ERROR 6D at 417A:32CF : Incompetent user