[HPADM] FTP Questions..

From: Jim Langston (jim.langston@walkerfirst.com)
Date: Fri May 30 2003 - 10:24:03 EDT


Okay folks, one of my developers is having some FTP issues. He has some
scripts that he has placed in oracle's cronttab. His procedure works fine
when he runs things from the command line, but when he places them in cron,
it doesn't work. For the life of me, I can't figure out what is happening.

any help is appreciated.

Cheers,

Jim

Here are the scripts: (btw, x.x.x.x represents the ip address we are
connecting to, and username and password represents the username and
password of the user)

runftp script:
rm -f /u/wynncommupdates/wynncomupdate.log
date > /u/wynncommupdates/wynncomupdate.log
sh /u/wynncommupdates/ftpscript.sh >> /u/wynncommupdates/wynncomupdate.log
#sleep 10
#mailx -s "Wynncomm FTP Update Log" markpr2@walkerassoc.com <
/u/wynncommupdates/wynncomupdate.log
mailx -s "Wynncomm FTP Update Log" dba@walkerassoc.com <
/u/wynncommupdates/wynncomupdate.log
mailx -s "FTP Log" jimla@walkerassoc.com <
/u/wynncommupdates/wynncomupdate.log

ftpscript.sh script:
#!/bin/sh
#
##########################################################
# #
# This script is updating wynncomm through FTP. It #
# puts the following files on ftp server x.x.x.x #
# #
# /u/wynncommupdates/RedZone.csv #
# /u/wynncommupdates/ItemFam.csv #
# /u/wynncommupdates/ItemGroup.csv #
# #
##########################################################

ftp -n -i << EOF
verbose
open x.x.x.x
user username password
put RedZone.csv
put ItemFam.csv
put ItemGroup.csv
bye
EOF

Here is the output that is given when it is run from the command line:

Fri May 30 09:50:45 EDT 2003
Verbose mode on.
Connected to x.x.x.x.
220 web Microsoft FTP Service (Version 5.0).
331 Password required for username.
230 User username logged in.
200 PORT command successful.
150 Opening ASCII mode data connection for RedZone.csv.
226 Transfer complete.
86309 bytes sent in 0.15 seconds (567.72 Kbytes/s)
200 PORT command successful.
150 Opening ASCII mode data connection for ItemFam.csv.
226 Transfer complete.
9715 bytes sent in 0.00 seconds (23196.34 Kbytes/s)
200 PORT command successful.
150 Opening ASCII mode data connection for ItemGroup.csv.
226 Transfer complete.
1819 bytes sent in 0.00 seconds (15720.06 Kbytes/s)
221

Here is the output when it is run from cron:

Fri May 30 09:52:00 EDT 2003
Verbose mode on.
Connected to x.x.x.x.
220 web Microsoft FTP Service (Version 5.0).
331 Password required for username.
230 User username logged in.
221

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:30 EDT