[Ssh-sftp-perl-users] Problems running under cron
Brought to you by:
dbrobins
|
From: Henry B. <Hen...@in...> - 2008-11-04 14:31:32
|
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
|