Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2002 22:54:07 -0500
From:      "DaleCo, S.P.---'the solutions people'" <daleco@daleco.biz>
To:        "Michael Collette" <metrol@metrol.net>, "FreeBSD Mailing Lists" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: FTP gone weird
Message-ID:  <034e01c27010$afc55cd0$fa00a8c0@DaleCoportable>
References:  <200210091438.26928.metrol@metrol.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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" <metrol@metrol.net>
To: "FreeBSD Mailing Lists" <freebsd-questions@FreeBSD.ORG>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?034e01c27010$afc55cd0$fa00a8c0>