Apply `chmod` for multiple files through FTP

Hi all,
Can you please help me in this aspect. I devoloped a FTP script to copy a directory to remote server. Now i got stuck-up in changing the file permissions for all the files in directory. I tried to change the permissions of single file and I did it but failed in changing permissions of multiple files. Can anybody guide me..

FTP script is

/usr/bin/ftp -v -n  "SERVER_IP_ADDR" << cmd
user "$USER" "$PASSWD"
cd $PATH_DESTINATION
lcd $PATH_SOURCE
hash
bin
put File_to_be_Transfered
chmod 777 File_to_be_Transfered    

cd $DIRECTORY_PATH_DESTINATION
lcd $DIRECTORY_PATH_SOURCE
prompt
mput *
chmod 777 $DIRECTORY_PATH_DESTINATION/*
quit
cmd

Thanks in advance

-Chanakya

Hi Chanakya,

I am also facing the same issue.... did u get any solution for this problem??
Kindly do share it with me...

I suggest you use the 'umask' command before you transfer any files to prevent having the 'chmod' anything afterwards.

I am using quote site chmod 777 Path/to/dir/*.xml for changing the mode but still i face the same problem it states the error as invalid command.