Automated FTP

Taking care of your Linux box.

Automated FTP

Postby refra » Thu Dec 26, 2013 3:14 pm

AOA,

I need a help about automated FTP process. scenario is

find a latest files according to the time stamp in /home/abc ; /d01/uat ; /demo/seen and upload all the files on ftp server according to date wise.

i find a latest file according to

#############################################################
DAT=`date '+%d-%b-%Y'`

find /home/abc /d01/uat /demo/seen -type f -newer chk >> logfile
cat logfile | while read FILES
do
lftp -u userid,passwd ftpserverip <<EOF
mkdir $DAT
cd $DAT
put $FILES
EOF
done
##################################################################
It executed perfectly, but gives a error like:

mkdir: Access failed: 550 26-Dec-2013: Cannot create a file when that file already exists
refra
Naik
 
Posts: 69
Joined: Wed Dec 06, 2006 3:51 pm

Re: Automated FTP

Postby mashkoor.qadir » Thu Feb 20, 2014 7:24 pm

it seems ftp user doesn't have permission on the directory.
mashkoor.qadir
Lance Naik
 
Posts: 32
Joined: Mon Dec 20, 2010 10:27 pm
Yahoo Messenger: mashkoor.qadir@yahoo.com
Location: Karachi

Re: Automated FTP

Postby nomankhn » Sun Feb 23, 2014 2:21 am

It is clearly mentioned in your message. Please check your ftp server directory name, it looks like that directory is already exist.

Code: Select all


mkdir: Access failed: 550 26-Dec-2013: Cannot create a file when that file already exists

nomankhn
Colonel
 
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 2 guests

cron