🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #672

Bug in fileutils-3.3 cp

#672
From: rha
Date: Wed, 19 Aug 1992 15:25
30 lines
1810 bytes
cp -P seems to fail when the destination directory names have certain lengths.
The filename length of the file being copied doesn't seem to have any effect.
However, the length of the destination directory that fails is increased by
one if the file is given as a relative path. 

The following examples will fail.  You need to be root and in the root
directory. The destination directories must exist.  You should also be able
to create your own test cases such that you don't require root privileges.

I have not checked if destination directory lengths > 12 characters can cause
errors.

/bin/cp -P /usr/bin/clear /aa			/* 3 chars */
/bin/cp -P /usr/bin/clear aaa			/* 3 chars */
/bin/cp -P usr/bin/clear  aaa1			/* 4 = 3+1 for relative path */
/bin/cp -P usr/bin/clear  /aaa			/* 4 chars */
/bin/cp -P /usr/bin/clear bbbbbbb		/* 7 chars */
/bin/cp -P usr/bin/clear  bbbbbbb1		/* 8 chars */
/bin/cp -P /usr/bin/clear ccccccccccc		/* 11 chars */
/bin/cp -P usr/bin/clear  ccccccccccc1		/* 12 chars */
/bin/cp -P /usr/bin/clear aaa/bbbbbbb		/* 11 chars */
/bin/cp -P usr/bin/clear  aaa/bbbbbbb1		/* 12 chars */ 

This is the output of the 2nd and 3rd examples:

/bin/cp: cannot create regular file `aaa//usr/bin/clear': No such file or directory
/bin/cp: cannot create regular file `aaa1/usr/bin/clear': No such file or directory

Richard Almquist
rha@cbnewsi.att.com
Technical Details
Message-ID: <9208191528.AA04390@life.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!hoqub.ATt.COM!rha

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!hoqub.ATt.COM!rha
From: rha@hoqub.ATt.COM
Subject: Bug in fileutils-3.3 cp
Message-ID: <9208191528.AA04390@life.ai.mit.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 19 Aug 1992 15:25:00 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 31