FTP problem with delete

FTP problem with delete

am 14.06.2005 20:22:18 von rguse

I'm using the perl ftp module and have successfully automated
incoming and outgoing FTP to a number of sites.

To test a site, I place a file on it, verify it shows up in a
listing, delete it and verify it doesn't show up in a listing.
This has been working great for years.

However, I now have a problem with a new site where I
delete (returns true indicating success) but the file
is still on the site (although with no permissions) and it
disappears after 20-40 seconds.

Of course, this is breaking my automated check which not only
checks the return value of delete but also verifies a listing.

This does not occur with command-line FTP or with ws_ftp (the
file immediately disappears) so I'm lead to believe it has
something to do with the perl FTP module.

Debug shows that the ftp site is running manatee Microsoft FTP
Service (Version 4.0). The debug output also validates that
the DELE command is successful (250 DELE command successful).

Has anyone seen this before?

Thanks!

Re: FTP problem with delete

am 15.06.2005 18:22:14 von Jim Keenan

Richard Guse wrote:
> I'm using the perl ftp module and have successfully automated
> incoming and outgoing FTP to a number of sites.
>
> To test a site, I place a file on it, verify it shows up in a
> listing, delete it and verify it doesn't show up in a listing.
> This has been working great for years.
>
> However, I now have a problem with a new site where I
> delete (returns true indicating success) but the file
> is still on the site (although with no permissions) and it
> disappears after 20-40 seconds.
>
> Of course, this is breaking my automated check which not only
> checks the return value of delete but also verifies a listing.
>

I presume that by "verifies a listing" you mean verification by another
call to the module's "dir" or "ls" method -- as distinct from, say,
checking the site's index.html page.

> This does not occur with command-line FTP or with ws_ftp (the
> file immediately disappears) so I'm lead to believe it has
> something to do with the perl FTP module.
>

Has the OS from which you are running this script changed? (I ask
because I have one script using Net::FTP that works fine when I call it
from Windows or Linux but fails when called from Darwin. I have not
figured out why this is so, but suspect it may be because the
underlying 'ftp' program differs among these systems.)

jimk

Re: FTP problem with delete

am 16.06.2005 16:28:40 von rguse

Yes, I perform an "ls" to get a listing and verify that the file I
deleted is not in that listing.

The OS which I'm running this script has not changed.

Re: FTP problem with delete

am 17.06.2005 03:52:21 von Sisyphus

"Richard Guse" wrote in message
news:1118932120.456045.11600@g14g2000cwa.googlegroups.com...
> Yes, I perform an "ls" to get a listing and verify that the file I
> deleted is not in that listing.

Can you verify that both the 'ls' command that you run from the perl script,
and the 'ls' command that you run from the command line FTP client, initiate
the running of the same (identical) command on the FTP server ? Maybe they
don't .... and maybe the 'ls' from the perl script makes the FTP server run
a process that is a little behind the times .... whereas the 'ls' from the
command line client initiates a process that is very much up-to-date.

My other thought was that perhaps the $ftp->ls() result that you see after
the deletion is a cache of an earlier $ftp->ls() call .... but that doesn't
sound very likely to me .....

Other than that .... do you really need to run that double check ? If the
FTP server says it deleted the file, then that should be good enough
shouldn't it ? - and the fact that it takes half a minute or so for
$ftp->ls() to catch up, whilst an interesting puzzle, is inconsequential ?

Cheers,
Rob