Hi

Below you find an example of a file ftp upload with simultanenous modification 
of file attributes. I remember that I had some problems getting this far. I 
think that it may be important to use numbers (e.g 775) for the umask instead 
of something like "u+x".

If your "deployment files" are uploaded bye the same script, I recommend 
setting the file attributes while uploading.

Hope this helps a bit.

Regards
Martin



    <property name="upload.chmod.ftp" value="775"/>

                <!-- Upload single file -->
          <ftp server="${upload.server.ftp}"
               port="${upload.port.ftp}"
               remotedir="${ftp.remote.dir}"
               userid="${upload.uid.ftp}"
               password="${upload.password.ftp}"
               verbose="yes"
               skipFailedTransfers="false"
               action="put"
               chmod="${upload.chmod.ftp}"
               >
            <fileset dir="${source.dir}">
                    <include name="${source.file.filesetincludepattern}"/>
            </fileset>
          </ftp>

 

-----Ursprüngliche Nachricht-----
Von: Dick, Brian E. [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 24. August 2005 17:50
An: Ant Users List
Betreff: Error from ftp chmod action

I am trying to change the mode of some of my deployment files to executable by 
using the ftp task. It's not working. I checked Google, the ant doc and the 
commons-net api doc without finding much about chmod. What am I doing wrong?

Here is my ftp task.

<ftp server="${servername}"
     userid="${username}"
     password="${password}"
     remotedir="${remoteapphome}"
     action="chmod"
     chmod="+x"
>
   <fileset dir=".">
      <patternset refid="exec.fileset"/>
   </fileset>
</ftp>

Here is the output.

[ftp] chmod files
[ftp] Failed to issue Site Command: chmod +x start.csh [ftp] Failed to issue 
Site Command: chmod +x stop.csh [ftp] 2 files mode changed



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to