Created attachment 359401 [details] Proposed patch Description of problem: The patch for bug #497830 breaks "df -l" for regular users whena device is specified, causing a "Permission denied" error whereas "df -l" lists all the devices correctly. Version-Release number of selected component (if applicable): coreutils-5.97-23 How reproducible: 100% reprodicbile Steps to Reproduce: 1. Log-in a a regular user 2. Run "df -l" to list all devices: $ df -l Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 6983168 4864476 1758244 74% / /dev/hda1 101086 12436 83431 13% /boot tmpfs 255028 0 255028 0% /dev/shm 3. Pick one device and retry: $ df -l /dev/hda1 Actual results: df: `/dev/hda1': Permission denied Expected results: /dev/hda1 101086 12436 83431 13% /boot Additional info: The problem comes from the patch to fix bug #497830 (which is also upstream at least in the latest coreutils-7.5) open() on the device will fail as a regular user and df will stop with the "Permission denied" error. The attached patch tries that open()/fstat() method but will fallback to the previous stat() method if open()/fstat() failed.
Thanks for report and patch, adding upstream maintainer to CC as the problem exists upstream.
*** Bug 521106 has been marked as a duplicate of this bug. ***
Funny that the search I did before I created Bug 521106 didn't turn up this report. The system monitoring package we currently use (HP SiteScope) relies on being able to run df /dev/path/here to monitor free space on individual volumes. Because of this regression, disk monitoring is currently not working for any of our RHEL 5.4 boxes. We're therefore very interested in what the timeline is for seeing a fix for this released into the channel.
As package maintainer I can't guarantee any timeline - but coreutils is common component of almost every regular update. So this will LIKELY be fixed for 5.5 as the patch is available and solves the issue. You could check other possibilities with product support (as bugzilla is not product support for Red Hat Enterprise Linux).
Funnily I am in the same situation than Tim, I'm running the same monitoring tool and have the same issue with 5.4. I'm stuck now until a fix is released.
*** Bug 521206 has been marked as a duplicate of this bug. ***
We have the same issue with Sitescope and RH5.4. This should be urgent as it's a regression.
Fix commited to CVS -> MODIFIED
Should this not be closed as the patch has long been released.
No, it should stay opened until regular RHEL-5 coreutils update will be released.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: The coreutils update included with Red Hat Enterprise Linux 5.4 introduced a regression in the df command. Running "df -l" with a specific device specified (for example, "df -l /dev/hda1") resulted in a "Permission denied" message for regular users. This update corrects the regression: specifying a device now works for regular users as it did previously. Note: running "df -l" to list all devices was not affected by this bug: it worked as expected previously and continues to do so subsequent to this update.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1,3 @@ -The coreutils update included with Red Hat Enterprise Linux 5.4 introduced a regression in the df command. Running "df -l" with a specific device specified (for example, "df -l /dev/hda1") resulted in a "Permission denied" message for regular users. This update corrects the regression: specifying a device now works for regular users as it did previously. Note: running "df -l" to list all devices was not affected by this bug: it worked as expected previously and continues to do so subsequent to this update.+Due to a regression, running the "df -l" command with a specific device specified resulted in a "Permission denied" error message for regular users. This bug has been fixed and specifying a device now works for regular users. + +Note that running the "df -l" command to list all devices was not affected by this bug; it worked as expected previously and continues to do so subsequent to this update.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1074.html