Using FTP from cron with .netrc

Kevin Meek kmeek at cti1.UUCP
Wed Jan 9 09:48:13 AEST 1991


I am trying to send files from a central machine to 
another file on the remote host.

What I've done is create a .netrc directory in my home directory
with the machine name and password.

then I run the following shell script

# ---- shell script ----------
#
# Shell script to send files to remote machine
#  .netrc should take care of login etc.
#
ftp machinename <<!
binary 
send file1 junk1
send file2 junk2
quit
!
# ---- End of shell script ----------


This script works fine when I execute it from the prompt 
but when I try to run it from my cron I get the following
errors.  

 Name (sea06u:): Password (sea06u:binary): Login disallowed for binary.
 Login failed.
 ?Invalid command
 Please login with USER and supply the password when the prompt appears.
 Please login with USER and supply the password when the prompt appears.

It isn't using the .netrc??  

I tried setting the $HOME variable and even running an
su -c username "shellscript" in the cron so my .profile
would be run but still no dice!.

Any suggestions  -- why won't ftp work from cron.

I am working on an AT&T 3B2600G running system V ver 3.2.2

Kevin Meek

-- 
Kevin Meek 
kmeek at cti.com



More information about the Comp.sys.att mailing list