From owner-freebsd-questions Fri Nov 15 10:36:18 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 7A4DE37B401; Fri, 15 Nov 2002 10:36:16 -0800 (PST) Received: from dexter.starfire.mn.org (starfire.skypoint.net [199.199.159.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDFB243E3B; Fri, 15 Nov 2002 10:36:13 -0800 (PST) (envelope-from john@dexter.starfire.mn.org) Received: (from john@localhost) by dexter.starfire.mn.org (8.11.3/8.11.3) id gAFIaBX83220; Fri, 15 Nov 2002 12:36:11 -0600 (CST) (envelope-from john) Date: Fri, 15 Nov 2002 12:36:11 -0600 From: John To: Matthew Seaman , freebsd-questions@FreeBSD.ORG Subject: Re: FTP and cron Message-ID: <20021115123611.A83141@starfire.mn.org> References: <20021115103931.A82781@starfire.mn.org> <20021115173059.GA48777@happy-idiot-talk.infracaninophi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021115173059.GA48777@happy-idiot-talk.infracaninophi>; from m.seaman@infracaninophile.co.uk on Fri, Nov 15, 2002 at 05:30:59PM +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 On Fri, Nov 15, 2002 at 05:30:59PM +0000, Matthew Seaman wrote: > On Fri, Nov 15, 2002 at 10:39:31AM -0600, John wrote: > > > No, it's not something simple like cron not running expect, or ftp > > being in "non-interactive mode". The prework all runs correctly, > > I even set the hash byte count and get the feedback from that... > > when the put command starts, though, things get different! I get > > different progress messages, no hash marks, and apparently, no > > data transferred. The file NAME appears on the remote side, but is > > 0 length regardless of how long I wait. When I run the scripts > > from the terminal, it works fine. > > When you're running from cron(8) you get a very limited environment. > You won't get a tty assigned to you, and the $TERM environment > variable won't be set. That makes it difficult for ftp(1) to do any > of the screen control things you may be expecting. Well, I think that "expect" takes care of that, since it assigns a pty, and I had set TERM in an act of desparation... > Stuff like $FTP_PASSIVE_MODE, which is often set out of > /etc/login.conf, won't be configured either. Actually, on reflection > the symptoms you describe sound like ftp(1) active mode breakage to me > --- you tend to get that if you're running a firewall on the client > end of the ftp connection. Try using pftp(1) or equivalently, > supplying the '-p' flag on the ftp command line. WOW! Bingo! This was it. Works great now. The answer brings up almost as many questions as it answers, though. I understand ftp active and passive mode, but why... Never mind. You nailed that, too. Precisely correct, doctor! FTP_PASSIVE_MODE=YES is right there in /etc/login.conf. When I upgraded to FreeBSD 4.3 AND changed my firewall at the same time, the changes canceled each other out. The differences in the FTP dialog stayed below my visual filter threshold. Everything now works perfectly. As someone who has taught others the differences between ftp active and passive mode, I am doubly chagrinned that I so adamantly refused to acknowledge the truth so blatantly before me. When I went back and looked at those two outputs I mailed, well, wow, that should have been screaming at me, and I missed it. Thank you all for your patience, thank you all for your time, and thank you that it works, and I understand how/why/wherefore! That doesn't happen every day, you know... -- John Lind john@starfire.MN.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message