Operating System - HP-UX
1753501 Members
3957 Online
108794 Solutions
New Discussion юеВ

Re: Automation of FTP processes

 
James R. Ferguson
Acclaimed Contributor

Re: Automation of FTP processes

Scott:

I personally favor, and use, the technique suggested by Dale. I'm a firm believer in scripting production (routine) processes and find that log files that can be keep for a prescribed period are invaluable in operational management. I use a generalized script of the form:

{
echo "open" $HOST
user $WHO $WHOPASS
hash
$ACTION $LOCALFILE $REMOTEFILE
close
} | ftp -i -n -v 2>&1 | tee -a $LOGFILE

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Automation of FTP processes

Scott:

OOPS! The scipt should have an opening quote (") before the word 'open'; no closing quote after 'open'; but a closing quote after 'close' -- to wit: ...close".

...JRF...
Alan Riggs
Honored Contributor

Re: Automation of FTP processes

I agree that scripting and logging production ftp's is a good idea. However, I personally have a real issue with encoding passwords in plaintext scripts. The .netrc can (should) have 400 permissions for the user in question, making it (slightly) better than placing the password in a script which might be more broadly accessed.