From owner-freebsd-questions Wed Oct 9 20:54:46 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 EC7A237B401 for ; Wed, 9 Oct 2002 20:54:43 -0700 (PDT) Received: from mail.gbronline.com (mail.gbronline.com [12.145.226.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5110343E4A for ; Wed, 9 Oct 2002 20:54:43 -0700 (PDT) (envelope-from daleco@daleco.biz) Received: from DaleCoportable [12.145.236.114] by mail.gbronline.com (SMTPD32-7.13) id A9B2221000C8; Wed, 09 Oct 2002 22:53:22 -0500 Message-ID: <034e01c27010$afc55cd0$fa00a8c0@DaleCoportable> From: "DaleCo, S.P.---'the solutions people'" To: "Michael Collette" , "FreeBSD Mailing Lists" References: <200210091438.26928.metrol@metrol.net> Subject: Re: FTP gone weird Date: Wed, 9 Oct 2002 22:54:07 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 I seem to remember a post about cron not doing what the user did, and it was a shell issue. Try your command in sh, csh, etc., and see if you can get the same error from CLI, if so, then the shell is the issue. Grasping a straw, Kevin Kinsey DaleCo, S.P. ----- Original Message ----- From: "Michael Collette" To: "FreeBSD Mailing Lists" Sent: Wednesday, October 09, 2002 4:38 PM Subject: Re: FTP gone weird > On the recommondation of an off list response I attempted using some other > tools instead of "ftp". Tried fetch, wget, and even curl. wget didn't like > the port forwarding, cron or not. > > Both fetch and curl work off the command line. They also don't produce an > error when run from cron. Neither one is actually getting the file though. > > What in the heck is it about cron that goofs these ports up?? > > Later on, > > Michael Collette wrote: > > Having a heck of a time with what I thought would be a pretty simple cron > > job > > of pulling down a web log via FTP. In the process, I've run into a wall > > of port problems. > > > > The Scenario: > > I'm running an ssh session looped back to itself so as to configure a > > tunneled port forward from localhost:2121 to remoteserver:21 > > > > My cron job calls a small shell script that puts together the proper file > > name to get for the day, then issues the following command... > > > > ftp ftp://${USER}:${PW}@${SITE}:${PT}${REMDIR}${FILE} > > > > The site and port vars are set to "localhost:2121" to go through the > > tunnel. When I run this script from a command line, it works exactly as I > > would > > expect it to. From cron, I get the following error... > > > > Data connection to 127.0.0.1:49159 is not allowed when control connection > > is from 10.10.10.10:3553! > > > > The from IP is faked for this example. The actual error has the routeable > > IP > > address of this box. The port numbers both increment on each attempt. > > > > The end goal here is to just automate an FTP download through an SSH > > tunnel. The remote machine is not running sftp, nor do I have admin rights > > to it. SSH forwarding is pretty much my only option there. > > > > Any ideas? > > > > Later on, > > -- > "Outside of a dog, a book is man's best friend. Inside of a dog, it's too dark > to read." > - Groucho Marx > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message