Hi
I am FTPing a file to a remote server from my local server. But after I FTP it the permissions are not in executable option, I need to change the permissions of the FTPed file how can i do that. Below is my script
Wildcards are not allowed in the ftp implementation of chmod. The ftp environment is not shell but does have some similar commands.
Maybe consider restructuring the script to ftp the files one-by one (using put not mput) you should then be able to chmod the individual file.
This is a general statement because we don't know what Shell you have, what Operating Systems are involved or or what ftp software you are using. Not all ftp versions implement chmod.
If you can type it at the command line you can script it.
Btw. chmod 777 is not the normal permissions for a data file. The loosest permissions would be 666 .
If you have control over the comms configuration unix "rcp" might be more suitable.
Hi
i have tried using this command in the FTP
site chmod -R 777 /batch/ftpTest but it throws the following error
550 SITE CHMOD command failed. Does this mean the user I am trying to use does not have the required permissions?
I have also tried putting each file one after another (using put rather than mput).
I have got this command when searching in forums in this site.
It would still help to know what software you have.
This command looks unlikely to me:
Please try the very basic form of the command. Many ftp commands do not accept full pathnames or command switches. The chmod will only ever work if the account on the remote server has permissions to issue a chmod on the directory and if local ftpd policy allows the function. The permissions on the directory are important too. The "rhelp" (remote help) and similarly "rhelp site" at your ftp prompt should tell you whether the chmod command is implemented.
cd /batch
dir ftpTest
put ftpTest
dir ftpTest
chmod 777 ftpTest
dir ftpTest
If local rules allow there are much better methods than ftp to transfer files between unix servers.