Bug 489718 - Failing to replace an identical file/directory when upgrading causes rpm to fail
Failing to replace an identical file/directory when upgrading causes rpm to fail
Status: CLOSED DUPLICATE of bug 483071
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rpm (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Panu Matilainen
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-11 11:15 EDT by Olivier Fourdan
Modified: 2013-03-03 21:48 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-07 11:27:54 EDT
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 Olivier Fourdan 2009-03-11 11:15:43 EDT
Description of problem:

The problem occurred when our customer tried to upgrade the "filesystem" package on a setup where /home is NFS mounted without no_root_squash option.

rpm (via cpio) tried to replace the /home directory but failed to chown() the directory and therfore failed to upgrade the package.

While this sounds the right thing to do in the common case (ie fail if the directory/file cannot be upgraded), rpm could avoid that problem by checking first if the file (or directory) to be written is identical to the one in the cpio archive.

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

rpm-4.4.2-48.el5

How reproducible:

100% reproducible

Steps to Reproduce:
1. mount /home via NFS without the "no_root_squash" option
2. rpm -Uvh filesystem*.rpm
  
Actual results:

error: unpacking of archive failed on file /home: cpio: chown failed - Operation not permitted

Expected results:

rpm does not try to replace the directory if it has the same flags/modes/uid/gid

Additional info:
Comment 2 Panu Matilainen 2009-04-07 11:27:54 EDT

*** This bug has been marked as a duplicate of bug 483071 ***

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