Bug 58779 - cp -p failed to keep owner/group attributions.
cp -p failed to keep owner/group attributions.
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-24 08:41 EST by masanari iida
Modified: 2007-04-18 12:39 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-24 09:12:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description masanari iida 2002-01-24 08:41:03 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (Win98; U)

Description of problem:
cp -p failed to keep owner/group attributions.

Version-Release number of selected component (if applicable):
fileutils 4.0.36-4   tested No good.
fileutils 4.1         tested  No good
fleutils 4.1.5 (from www.gnu.org) No good.

How reproducible:
Always

Steps to Reproduce:
1.create file.         $touch file1
2.change to user2  $ su user2
3. cp file             $ cp -p file1 file2
4. check file owner/group/date      # ls -l

	

Actual Results:  
 $cp -p file1 file2 
   own     grp                time
   user1   user1    0   Jan 24 21:30   file1
   user2   user2    0   Jan 24 21:30   file2



Expected Results:  
 $cp -p file1 file2 
   own     grp                time
   user1   user1    0   Jan 24 21:30   file1
   user1   user1    0   Jan 24 21:30   file2


Additional info:
Comment 1 Bernhard Rosenkraenzer 2002-01-24 09:12:08 EST
user2 can of course not create files owned by user1 - allowing that
would be a major security problem (think of filling up someone
else's diskspace quota).

cp -p preserves the attributes it can; if you run it as root (the only
user that can create files owned by someone else), you'll get the
result you expect.

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