ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21865] New: - FTP chmod action fails on mode changes to file in subdirectories
Date Thu, 24 Jul 2003 20:44:38 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21865>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21865

FTP chmod action fails on mode changes to file in subdirectories

           Summary: FTP chmod action fails on mode changes to file in
                    subdirectories
           Product: Ant
           Version: unspecified
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: michael.nebus@pfizer.com
                CC: michael.nebus@pfizer.com


Problem:
The chmod function fails when trying to change the mode on a file not located 
in the working directory. This problem only occurs when the client is a windows 
based OS and the server is a UNIX based OS.

Example: 
An FTP task is called to transfer all files in the bin directory and all files 
that are withing subdirectories of the bin directory.  The chmod task succedes 
on any files located in the bin directory, but fails on anything located in 
bin/subfolder.

Cause:
The task calls the issueSiteCommand method with the clients original file 
seperator. With an NT client, the command is executed as chmod mode 
directory\filename becuase that is the way the filename is stored in the array 
of client's included files.

SourceFile: org.apache.tools.ant.taskdefs.optional.net.FTP
line#: 644 and 914 (revision 1.37)

Solution???: since the chmod function can only be called on a UNIX server, the 
easiest way might be to call the String.replace('\\','/') on the filename 
before the command is passed to the doSiteCommand(FTPClient, String) 
function. ..becuase the '\' file seperator will never be used with the chmod 
command (that I'm aware of).  (That's what worked for me ;)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message