--- In [email protected], "Geert Vancompernolle" <[EMAIL PROTECTED]> wrote: > > Hi, > > A while ago, I got an example script of John to easily transfer your > application from host to target by means of FTP. > > I slightly modified it, to be able to give the application as a > parameter to the script. > > Here it is: > > #!/bin/sh > HOST='192.168.123.135' > USER='root' > PASSWD='pass' > DIRECTORY='domotics' > > /usr/bin/ftp -v -n $HOST <<-EOF > quote user $USER > quote pass $PASSWD > cd $DIRECTORY > put $1 > pwd > ls > chmod go+x $1 > ls > EOF > > > However, I have a problem with it. > > If your application is FTP-ed for the first time from the host to the > target, the executable permissions are not set. > Therefore, I wanted to change the permissions from within the script > above. Hence, the presence of "chmod go+x $1". > But that doesn't work. Although "chmod" is part of the FTP command > set, I'm not able to change the permissions of that file, while in the > FTP session. I always get the following error: > > "550 No such file or directory." > > I tried to put other commands in between "put $1" and "chmod go+x" to > see if they were working, and they do. Both the "ls" and the "pwd" > are working fine and they show me I'm in the correct directory. > > Does anyone know why the "chmod" is not working? Am I doing something > wrong in the script? > > Any help appreciated. > > Best rgds, > > --Geert >
Would someone maybe have an idea about the above described problem? It's mainly to do with the fact that I can't change the permission of the file which has been FTP-ed to the FoxBoard. "chmod go+x $1" as part of an FTP command fails (although "chmod" is a valid FTP command)... Best rgds, --Geert
