Hi Jim,
Thanks for swift response. I wrote little script using Net::SFTP directly
and it seems to be working (even the debugging). I wonder where the problem
is. Here is part of the script where I do the connection (if it helps):
...
if ($port) {
$ftp = Net::xFTP->new($type, $hostname, ( Debug => $DEBUG, port =>
$port, user => $username, password => $password ));
} else {
$ftp = Net::xFTP->new($type, $hostname, ( Debug => $DEBUG, user =>
$username, password => $password ));
}
...
$ftp->binary;
if ($pasv) {
$ftp->pasv;
}
that's basically all connection part with $type = 'SFTP'. For the actual
removal I just call
if (!$ftp->delete($filename)) {
# do something bad
}
I'm afraid that's it. Not sure if it helps though :)
Cheers,
Tom
2010/4/9 Jim Turner via RT <bug-Net-xFTP@rt.cpan.org>
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=56410 >
>
> Greetings, Tom.
>
> Let's see if we can narrow this down a bit - have or can you try writing
> a small script to delete a file with the lower-level
> Net::SFTP.do_remove() method? This is what delete() uses. If not, then
> my guess would be some type of permissions issue. If so, then we need
> to continue to investigate Net::xFTP & i need to get a copy of the part
> of your code that is failing.
>
> Regards,
>
> Jim
>
>
>
> On Thu Apr 08 22:22:45 2010, instantni.med@gmail.com wrote:
> > Hi Jim,
> >
> > I'm trying to remove some remote files sitting on SFTP server. Everything
> > works perfectly, delete() returns non-zero value, message() returns "0:
> no
> > error" but the files are still sitting on the server :). Other methods
> (put,
> > get, cwd, dir) work perfectly, just delete doesn't do anything. Any
> ideas?
> >
> > I'm using Net::SFTP (0.10), Net::xFTP (0.3b1), perl 5.8.8 on CentOS 5.4
> >
> > No debug messages as Debug => 1 works only with normal FTP module, it
> > doesn't show anything for SFTP.
> >
> > Btw. this module is very helpful, so thanks for good work so far :).
> Aren't
> > you planning to include FTPSSL (Net::FTPSSL) as well?
> >
> > Cheers,
> >
> > Tom
>
>
>
>