From owner-freebsd-questions Fri Nov 15 9:31:15 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 3C76837B401 for ; Fri, 15 Nov 2002 09:31:14 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC0B143E42 for ; Fri, 15 Nov 2002 09:31:12 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id gAFHV460049181 for ; Fri, 15 Nov 2002 17:31:04 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 gAFHUxO5049180 for freebsd-questions@FreeBSD.ORG; Fri, 15 Nov 2002 17:30:59 GMT Date: Fri, 15 Nov 2002 17:30:59 +0000 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Subject: Re: FTP and cron Message-ID: <20021115173059.GA48777@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: <20021115103931.A82781@starfire.mn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021115103931.A82781@starfire.mn.org> 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 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. 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. 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