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=9586>.
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=9586
FTP Task fails uploads with "550 dirname: File exists"
Summary: FTP Task fails uploads with "550 dirname: File exists"
Product: Ant
Version: 1.5Beta2
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: Other
Component: Optional Tasks
AssignedTo: ant-dev@jakarta.apache.org
ReportedBy: Christian.Hujer@itcqis.com
Hello,
I just have found out that the ftp task seems to be corrupt in Ant 1.5Beta2 (at
least for me). The ftp task worked fine in Ant 1.5Beta1 (at least for me).
The corruption obiously occurs when the ftp tasks tries to upload a directory
that is newer on the local file system than on the remote file system. The ftp
task then tries to create the already existing directory, which causes the task
to fail with an FTP 550 Response Code.
I was able to reproduce this behaviour on two different FTP Servers.
One gave me:
[...]could not create directory: 550 de: File exists[...]
Anotherone gave me:
[...]could not create directory: 550: Permission denied[...]
Since both FTP Servers are not my FTP servers, I do not know what types of ftp
demons are running these services. Sorry.
I report this against Platform All and OS All because I believe this bug is OS
and Platform independant. Sorry if I am wrong.
I use Ant 1.5Beta2 on a machine with JDK 1.4 from SUN on a P-III-600 with SuSE
Linux 7.3/8.0 and NetComponents.jar from Savarese NetComponents 1.3.8a.
I have attached a build.xml to reproduce the error.
If you cannot reproduce the error, just wait. This might be the remote machine
having a "newer" (sorry, don't know the right word) time than your machine. Wait
a few minutes and run ant again. The directory to upload must locally have a
newer timestamp than the directory on the remote machine.
I hope I provided all information neccessary.
If you need further information, you are invited to mail me.
Greetings
Christian
build.xml:
<project name="CrashFTP" default="crash">
<description>
This will show how the FTP Task of Ant 1.5Beta2 fails to upload files
from a directory within a fileset into an existing
directory.
</description>
<target
name="crash"
description="Run the test case, try crashing the FTP Task"
>
<!-- Setup the files for a first time -->
<antcall target="init" />
<!-- Upload the files for the first time. Everything should be fine. -->
<antcall target="upload" />
<!-- Now clean up and create the files new to simulate everyday work.
The directory now is newer than on the remote machine. -->
<antcall target="clean" />
<antcall target="init" />
<!-- upload it a second time so the structure already exists. Fails. -->
<antcall target="upload" />
</target>
<target
name="clean"
description="delete temporary files"
>
<delete dir="dest" />
</target>
<target
name="init"
description="Create a directory and file structure as a test case"
>
<mkdir dir="dest/htdocs/de" />
<touch file="dest/htdocs/de/test.html" />
</target>
<target
name="upload"
description="upload files on a server - calling it twice will fail"
>
<ftp
server="*******"
userid="*******"
password="*******"
depends="yes"
passive="yes"
>
<fileset dir="dest/htdocs" />
</ftp>
</target>
</project>
--
To unsubscribe, e-mail: <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>