Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 166730

Summary: non root users should be able to use the display cmds
Product: Red Hat Enterprise Linux 4 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Petr Rockai <prockai>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 4.0CC: agk, dwysocha, mbroz
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0776 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-24 20:07:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2005-08-24 22:53:24 UTC
Or if not, at least the errors should be more clean

Description of problem:
[testmonkey@link-13 root]$ lvdisplay
  /etc/lvm/.cache: open failed: Permission denied
  No volume groups found
  /etc/lvm/.cache: fopen failed: Permission denied
[testmonkey@link-13 root]$ lvs
  /etc/lvm/.cache: open failed: Permission denied
  No volume groups found
  /etc/lvm/.cache: fopen failed: Permission denied

Comment 1 Alasdair Kergon 2005-08-30 16:08:39 UTC
Yeah - need to think a bit about this one: there are some circumstances where
it's useful for non-root users to be able to run the tools.  I'm not sure much
can be done though apart from displaying a warning message if run by a non-root
user.  [Useful if the user hasn't realised they aren't root and is puzzled why
everything's disappeared.]


Comment 2 Petr Rockai 2007-11-10 11:51:13 UTC
In my opinion, this just needs a better diagnostic (ie, the warning Alasdair 
mentioned). As a non-root, you cannot meaningfully use fdisk nor find out much 
about partition layout either, so this would probably pose an information leak 
anyway. For the user-interesting bits, one usually uses "df". I can take care 
of that warning message.

Comment 4 Alasdair Kergon 2007-11-10 16:08:49 UTC
Comment #2 needs clarification: there is a difference between things the kernel
requires you to be root to do, and things (like fdisk) that can be done as
non-root but are often restricted by filesystem permissions.  Hence my
suggestion that we just print a simple general warning when run as root that
some functionality may be restricted.

Comment 7 Corey Marthaler 2008-06-09 15:20:11 UTC
Verified that there's now a warning message.

Comment 9 errata-xmlrpc 2008-07-24 20:07:06 UTC
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-2008-0776.html