I'm trying to copy a file from a windows box to a linux box. This will be done weekly so I'm using Perl and the module Filesys::SmbClientParser
Here's the relevant code:
my $smb = new Filesys::SmbClientParser (undef,
("user" => $winuser,
"password" => $winpassword,
"Debug" => "1"
)
);
$smb->Host($winserver);
$smb->Share($winshare);
$smb->get($winlogname, "/tmp/win.log") or die("THERE WAS AN ERROR SMBE
+RR: " . $smb->err);
print "Winlog now at /tmp/win.log\n";
My problem is that it will give me the following error message:
"Short read when getting file \filename. Only got 671956992 bytes."
Sometimes it will get 0 bytes.
Now thinking this might be some weird issue with smbclient, I did the following from the command line:
[root@mybox scripts]# smbclient -U ftpusr \\\\wit211\\W3SVC1 mypass
Domain=[NTDP] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Win
+dows Server 2003 5.2]
smb: \> get filename
getting file \filename of size 1763006291 as filename (8802.2 kb/s) (a
+verage 8802.2 kb/s)
smb: \> [root@mybox scripts]#
So this makes me think I'm running into some limit or something imposed by Perl or the module.
Does anyone have any suggestions how I can fix this problem?
Thanks in advance