Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 142083 - hardlinked file permissions, warning?
hardlinked file permissions, warning?
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2004-12-07 01:36 EST by Nigel Kukard
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-12 11:20:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nigel Kukard 2004-12-07 01:36:05 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)

Description of problem:
When building an RPM package, if a file is installed to RPM_BUILD_ROOT
and hardlinked to another file name and an %{attr} statement added to
the first one, rpm does a double chown/chmod and resets permissions on
the first one.

for instance (in the %install section)...

touch RPM_BUILD_ROOT/sbin/a
chmod 644 RPM_BUILD_ROOT/sbin/a

in the %files section...

%attr(0755,root,root) /sbin/a

when installed both files with be 0644.

this is not really a bug in rpm, but maybe a warning would be a good idea?

Version-Release number of selected component (if applicable):
rpm-4.3.3 & rpm-4.4

How reproducible:

Steps to Reproduce:
1.create an rpm specfile which hardlinks one file to another name
2.create an attr statement  for first file and leave second file
without an %attr() statement
3.install rpm

Actual Results:  both files are set with default permissions of second
file above

Expected Results:  maybe a warning message?

Additional info:
Comment 2 Jeff Johnson 2006-02-12 11:20:19 EST
There are a vanishingly small number of packages attempting both hardlinks
and %attr, so the work detecting different %attr modifiers on hardlinks is not
worth the effort imho.

The command
     rpm -V pkg
will detect multiple %attr apllied to hardlinks.

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