Bug 67362 - rcp doesn't work with large files
rcp doesn't work with large files
Product: Red Hat Linux
Classification: Retired
Component: rsh (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Ben Levenson
: 87860 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2002-06-23 11:55 EDT by Need Real Name
Modified: 2015-03-04 20:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-17 11:38:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix rcp with filesizes > 2GB (774 bytes, patch)
2003-01-17 09:33 EST, Panu Matilainen
no flags Details | Diff

  None (edit)
Description Need Real Name 2002-06-23 11:55:05 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)

Description of problem:
rcp, as derived from the netkit-rsh-0.17 source in Red Hat 7.x, doesn't handle 
files larger than 2GB.  There are two types of failure:

- an existing large file can't be opened by rcp (the open() call fails with 

- trying to write a file on a Red Hat system that the remote side claims is 
larger than 2GB will result in the size variable in sink(), which is declared 
as an int, not to reflect the actual size of the file (it might be negative, or 
it might be filesize%4GB, because of the overflow) and the copy will be aborted 
prematurely after the Red Hat system's rcp believes it has read in the correct 
number of bytes.

more recent versions of freebsd's rcp fix the C code.  The snprintf expression 
involving stb.st_size should cast it to (long long) and use %lld instead of %
ld.  size should be declared as off_t rather than int.  And appropriate CFLAGS 
should be defined in the Makefile so that 64-bit versions of off_t, open(), and 
stat() get used; I happened to fix this by adding "CFLAGS += -

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. rcp largefile remote:destfile
2. (from another system whose rcp supports large files) rcp largefile 

Additional info:
Comment 1 Panu Matilainen 2003-01-17 09:32:03 EST
This is still present in phoebe/rawhide and RHL 8.0 as well. Adding this to the
MCONFIG-editing part and patching it as described by mp above fixes it for me:

Comment 2 Panu Matilainen 2003-01-17 09:33:25 EST
Created attachment 89423 [details]
Fix rcp with filesizes > 2GB
Comment 3 Phil Knirsch 2003-01-17 11:38:53 EST
Fixed in rsh-0.17-13 (available via rawhide shortly).

Read ya, Phil
Comment 4 Phil Knirsch 2003-06-25 11:04:34 EDT
*** Bug 87860 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.