chmod (permissions) * not working on remote server

Hi gurus !

I am developing a FTP script which will copy all the files from one server to another server and then I need to use CHMOD 755 * to set permissions of all the files just copied to the remote server.

mput *
chmod 755 *

CHMOD gives me an error [ *: No such file or directory ]

CHMOD works fine If I specify the full file name instead, any help????

Thanks

I would be sure to use the /path/to/data/* or at least part of the file name.

I never liked using * for chmod or chown, b/c you can really screw up a system. I had seen one box where chmod 444 * was done on the /etc directory. *shudders* I had to spend most of a day straightening it out.

Well it depends on the system that you are connected to:

if you are connected to mainframe and you want to do chmod --> it will say not valid

and even if u are connected to Unix server they can block users typing anything in the ftp shell. :rolleyes:

<<<DISCLAIMER>>>
i do not recommend doing this unless you know for SURE that the only files in the current remote directory are the files you just put there. you don't want to arbitrarily change permissions on other files
<<<DISCLAIMER>>>

the syntax you want to use in order to chmod 755 all the files in the current remote directory is this:

site chmod 755 *

if there ARE other files in the directory, then i suggest you re-write the script so that it puts one file at a time and then you can site chmod 755 one file at a time