jiewho has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use the Net::FTP module to download a file about 3 gb. When the local file reached 2147483647 bytes, I got an error message: can't not write to local file, or file size limit exceeded. But when I start the ftp program on the command line, I can download the complete file of 3 gb. My OS system is: Linux 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686, and the Perl version is: 5.6, but the original built was configured to a different OS version of the following:

$ perl -V Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.4.6-3.

1enterprise, archname=i386-linux uname='linux stripples.devel.redhat.com 2.4.6-3.1enterprise #1 smp

tue jul 2 4 14:03:17 edt 2001 i686 unknown '

Was there a known issue like this when using this module in such an environment? Any input will be greatly appreciated.

Thanks, Jeff

Replies are listed 'Best First'.
Re: Net::FTP: file size limit on Linux?
by iburrell (Chaplain) on Apr 09, 2004 at 21:58 UTC
    If you can download the whole file on the command line, then the Linux kernel and glibc support files bigger than 2 GB. The problem is that version of Perl probably wasn't compiled large file support. It won't support files larged than 2 GB. In the 'perl -V' output look for any mention of 'uselargefiles'.

    I am guessing you are using RHEL 2.1. RHEL 3 has a Perl with USE_LARGE_FILES compiled in. You might consider upgrading the OS. The other option is rebuilding Perl with that flag turned on.

      Thanks. Yes, the uselargefiles flag was undef. We will try to rebuild perl.