NetWare FTP Server doesn't display file sizes over 2 GB correctly.

  • 3766638
  • 23-Oct-2007
  • 26-Apr-2012

Environment

Novell NetWare 6.5
Novell NetWare 6.0
Novell NetWare 5.1
Novell NetWare FTP Server (NWFTPD.NLM)

Situation

NetWare FTP Server doesn't display file sizes over 2 GB correctly.
 
Note: For purposes of this discussion, a gigabyte is defined as 1024 MB, or 1024*1024*1024 bytes.

Resolution

The original design of NWFTPD.NLM (back around 2000) made use of older CLIB APIs which had limits to the sizes that could be dealt with. In November 2003 NWFTPD was enhanced (for NetWare 6.0 and 6.5) to make use of some newer LIBC APIs which deal with larger sizes, but this only added the ability to successfully _transfer_ larger files. The information displayed in longdirectory lists through FTP still relies on the older CLIB APIs. That, combined with the manner in which NWFTPD handled directory listings, limited correct file size reporting to 2 gigabytes.
 
As part of maintenance of NetWare 6.5, some steps have been taken to improve this limitation, but it should be noted that NWFTPD is not being fully redesigned to use LIBC APIs, so some limitations will continue to be present. The following improvements are available in NetWare 6.5 SP7, also available in download NWFTPD14.ZIP (search for that name at https://support.novell.com/patches.html).
 
1. The variable used for tracking size within NWFTPD was redefined so it can handle up to 4 gigabyte sizes (or technically, up to 1 byte less than 4 gigabytes.) This is done while continuing to rely on the older CLIB APIs. This will benefit both the long directory listings and the output of the SIZE command.
 
2. The functionality of the SIZE command is being enhanced. If the file in question is on the same physical system where NWFTPD.NLM is running, the SIZE function will also use the LIBC 'stat' function to obtain size information over 4 gigabytes. Note that this will only enhance the output of the SIZE command, it will not change the output shown in directory listings.
 
So to restate the specific new FTP functionality:
 
- all file sizes in FTP directory listings will be accurate up to (but not including) 4 gigabytes, regardless of whether the listing is on a local or remote volume. Files 4 gigabytes and larger will all report 1 byte less than 4 gigabytes.
 
- file sizes obtained with the SIZE command on volumes which are remote (relative to the FTP server) will be accurate up to (but not including) 4 gigabytes. Files 4 gigabytes and larger will all report 1 byte less than 4 gigabytes.
 
- file sizes obtained with the SIZE command on volumes which are local to the FTP server will be accurate up to any size that can be present on the volume in question.

Additional Information

Formerly known as TID# 10101167