Hello all,
FYI and the record: my solution was to change to using Net::SSH2::SFTP.
Regards,
Henry
On Tuesday, November 04 2008 09:31 am, Henry Baragar wrote:
> Hello all,
>
> I have an application that runs fine from the command line, but produces
> the following error when run under cron:
>
> input must be 8 bytes long
> at /usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/C
> rypt/DES.pm line 57
>
> This is being run under:
> SUSE Linux version 2.6.16.27-0.6-smp
> perl v5.8.8 built for x86_64-linux-thread-multi
> $Net::SFTP::VERSION: 0.10
> $Net::SSH::Perl::VERSION: 1.30
>
> The code is fairly simple:
>
> sub deliver {
> my $self = shift;
> my ($host,$directory,%cred) = $self->parse_address;
> my $sftp = Net::SFTP->new($host, %cred);
> my $path = $directory . $self->file_name;
> my $flags = SSH2_FXF_WRITE | SSH2_FXF_CREAT | SSH2_FXF_TRUNC;
> my $handle = $sftp->do_open($path, $flags);
> $sftp->do_write($handle,0,$self->payload);
> $sftp->do_close($handle);
> # return value not used
> }
>
> Any suggestions on how to fix this problem?
>
> Regards,
> Henry
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Ssh-sftp-perl-users mailing list
> Ssh...@li...
> https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users
|