ftp error messages!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ftp error messages!
# 1  
Old 10-19-2007
ftp error messages!

Please see the below script-

ftp $FTPREMOTESERVER
prompt
mput $DATAPATH/*.dat
quit | ftp -in > FTPRETURNMSGLOGFILE # iam trying write the eroor messages inside a file when the ftp quits.

Based on the above script te ftp is properly working but writing into the file wen ftp quits is nor working.Any suggestions
# 2  
Old 10-19-2007
Hi This is what I do
hope it helps

#
# launch ftp program and write to FTP_LOG FILE
#
FTP_LOG= ${USR_HOME}"FTP_LOG".lis

$FTP_PROG $USR@$IPN -pw=$PSS -ce -unat=y -cmd="$CMDS;" >>${FTP_LOG}
RTNCD=$?
#
#check the return code for error
# look for error message in the log and email admin
#
if [[ !0 = $RTNCD ]]
then
echo "FTP ERROR: "$RTNCD >>$O_ERR
awk -F '[:.]' '$1 == "Warning" { print $2 }' ${USR_HOME}${FTP_LOG}
>>$O_ERR
awk -F '[:.]' '$1 == "Error" { print $2 }' ${USR_HOME}${FTP_LOG}
>>$O_ERR
send_mail
fi
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SuSE

Some error messages in var/log/messages

How are you? SUSE V10 and 11. In /var/log/messages I see these lines in some servers. I'd like to know what causes these errors and how to fix them. Thank you, error: PAM: Authentication failure for root from XXXXXXXX Did not receive identification string from XXXXXXX Invalid user suse-gm... (2 Replies)
Discussion started by: JDBA
2 Replies

2. Shell Programming and Scripting

FTP error

Hi Guys I have written a shell script that will connect to a FTP server and get a list of files that exists in a directory. The FTP code is as follows. ftp -i -n -v ${FTP_HOST} <<EOF user ${FTP_USER} ${FTP_PASSWORD} cd ${FTP_DIR} ls *.txt... (1 Reply)
Discussion started by: crystal_pup
1 Replies

3. Shell Programming and Scripting

Help with FTP Script which is causing "syntax error: unexpected end of file" Error

Hi All, Please hav a look at the below peice of script and let me know if there are any syntax errors. i found that the below peice of Script is causing issue. when i use SFTP its working fine, but there is a demand to use FTP only. please find below code and explain if anything is wrong... (1 Reply)
Discussion started by: mahi_mayu069
1 Replies

4. Shell Programming and Scripting

ftp error.

i try to put files to ftp server. but i got "550 Command STOR failed" error. can u help me about this error? my codes: -bash-3.00$ ftp xxx.com Connected to xxx.com 220 xxx.com X2 WS_FTP Server 7.5(39687500) Name (xxx.com:oracle): user 331 Enter password Password: 230 User logged in... (2 Replies)
Discussion started by: imtheone
2 Replies

5. Shell Programming and Scripting

FTP Error 553 I/O error.

Hi All, I have a problem when uploading txt file from windows to Unix server. I got 533 I/O error. I am using .bat file and it works for other batches but with this particular batch it doesn't work. thanks guys for helping in advance. (2 Replies)
Discussion started by: sfaqih
2 Replies

6. Shell Programming and Scripting

ftp error

This used to work , but know I am getting errors: 331 Enter password 230 User logged in 250 Command CWD succeed 200 Transfer mode set to BINARY local: arc-090715.tar.gz remote: arc-090715.tar.gz local: arc-090715.tar.gz: No such file or directory Any idea what is wrong? Thank you in... (2 Replies)
Discussion started by: Lenora2009
2 Replies

7. Shell Programming and Scripting

PERL: NET::FTP..>Debug Messages

HI All, NET::FTP->new($server, DEBUG=>1); I need to get all the Debug Messages in an array or a file.... Please suggest!! (0 Replies)
Discussion started by: angad.makkar
0 Replies

8. UNIX for Advanced & Expert Users

error messages in /var/adm/messages

Hi, I have a SunFire V490, Solaris 10 with XP1024 storage and HP Library. I have noticed the following error messages in the /var/adm/messages file. These errors are being generated constantly. Also commands like devfsadm, format cfgadm etc are getting hung. After a reboot it works fine for a... (1 Reply)
Discussion started by: nitinp82
1 Replies

9. UNIX for Dummies Questions & Answers

Telnet Server FTP warning messages 500 'AUTH GSSAPI' how to resolve??

These are the warning messages I am getting but the FTP works fine.How do I get rid of these? 220 FTP server (SunOS 5.8) ready. 500 'AUTH GSSAPI': command not understood. 500 'AUTH KERBEROS_V4': command not understood. KERBEROS_V4 rejected as an authentication type (0 Replies)
Discussion started by: csviking
0 Replies

10. UNIX for Advanced & Expert Users

I/O Error with ftp and cp

Hello, sometimes when I perform an ftp or cp on a NFS mounted filesystem, the transfer break with the message I/O error. There are no log messages, which help me, only sometimes there is the additional message in the log file, my NFS server timed out. Both systems are IA-64 Linux systems with... (2 Replies)
Discussion started by: malcom
2 Replies
Login or Register to Ask a Question