X-Spam-Check-By: sourceware.org From: "Wes S" To: cygwin AT cygwin DOT com Date: Mon, 23 Jan 2006 16:07:46 -0500 MIME-Version: 1.0 Subject: trouble automating ftp with cron Message-ID: <43D4FF52.28259.14DCA2C@wess.acegroup.cc> Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-BCN: Meridius 1000 Version 3.2 on smtp.acecomgroup.com X-BCN-Sender: wess AT acegroup DOT cc X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I've been trying the last two days to get this to work but if fails using cron with cygwin but works just fine using cron with Fedora Core 4. If I run myscript.sh from a console the script runs fine. I can't seem to login to the ftp site when run from cron. Any ideas? I've tried running this as both Administrator and power user wess. I updated cywin to whatever was current this morning and tried again before posting this. Thanks, Wes S crontab -- start 33 15 * * * /home/wess/csplog/myscript.sh crontab -- stop email from cron -- start Connected to cadillacsportsmansclub.org. 220-linhost148.prod.mesa1.secureserver.net NcFTPd Server (licensed copy) ready. 220-Guest logins are not allowed here. You must login with your assigned 220-username and password with your FTP client program. If you're using 220-Internet Explorer, try the "Login as..." menu option under the "File" menu, 220-or in other FTP client programs, you can try this URL: 220- 220- ftp://username AT YourDomainName/ 220 User (cadillacsportsmansclub.org:(none)): 501 Syntax error in parameters. Login failed. 221 Goodbye. done myscript.sh -- start #! /usr/bin/bash HOME=/home/wess export HOME datestamp=`date '+ %Y%m%d'` echo $datestamp cd /home/wess/csplog mkdir $datestamp cd $datestamp ftp -v ftp.cadillacsportsmansclub.org echo done myscript.sh --ends .netrc -- start machine ftp.cadillacsportsmansclub.org login myusername password mypasswd macdef init prompt off cd stats mget * bye myscript.sh --ends run from console by directly running ./myscript.sh -start wess AT barefoot ~/csplog $ ./myscript.sh Connected to cadillacsportsmansclub.org. 220-linhost148.prod.mesa1.secureserver.net NcFTPd Server (licensed copy) ready. 220-Guest logins are not allowed here. You must login with your assigned 220-username and password with your FTP client program. If you're using 220-Internet Explorer, try the "Login as..." menu option under the "File" menu, 220-or in other FTP client programs, you can try this URL: 220- 220- ftp://username AT YourDomainName/ 220 331 User myusername okay, need password. 230 Restricted user logged in. prompt off Interactive mode off. cd stats 250 "/stats" is new cwd. mget * local: .statspwd remote: .statspwd 200 PORT command successful. 150 Opening ASCII mode data connection for .statspwd (21 bytes). 226 Transfer completed. 22 bytes received in 0.009 seconds (2444 bytes/s) local: BROWSERREP.html remote: BROWSERREP.html 200 PORT command successful. 150 Opening ASCII mode data connection for BROWSERREP.html (6654 bytes). 226 Transfer completed. 6671 bytes received in 0.236 seconds (28266 bytes/s) local: BROWSERSUM.html remote: BROWSERSUM.html 200 PORT command successful. 150 Opening ASCII mode data connection for BROWSERSUM.html (3869 bytes). 226 Transfer completed. 3882 bytes received in 0.074 seconds (52459 bytes/s) local: BROWSERSUM_bar.png remote: BROWSERSUM_bar.png 200 PORT command successful. 150 Opening ASCII mode data connection for BROWSERSUM_bar.png (3491 bytes). 226 Transfer completed. 3519 bytes received in 0.063 seconds (55857 bytes/s) local: DAILYREP.html remote: DAILYREP.html 200 PORT command successful. 150 Opening ASCII mode data connection for DAILYREP.html (6532 bytes). 226 Transfer completed. I chopped it off fhere. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/