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


In reply to Short Read with Filesys::SmbClientParser by xorl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.