Bug 429118 - non root users should be able to use the display cmds
non root users should be able to use the display cmds
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
5.2
All Linux
low Severity medium
: rc
: ---
Assigned To: Petr Rockai
Corey Marthaler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-17 09:21 EST by Milan Broz
Modified: 2013-02-28 23:06 EST (History)
7 users (show)

See Also:
Fixed In Version: RHBA-2008-0378
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 11:39:49 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 Milan Broz 2008-01-17 09:21:27 EST
+++ This bug was initially created as a clone of Bug #166730 +++
RHEL5 clone - warning if lvm command is running without root privileges

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

-- Additional comment from agk@redhat.com on 2005-08-30 12:08 EST --
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.]


-- Additional comment from prockai@redhat.com on 2007-11-10 06:51 EST --
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.

-- Additional comment from agk@redhat.com on 2007-11-10 11:08 EST --
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 2 RHEL Product and Program Management 2008-01-17 09:26:19 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 3 Milan Broz 2008-01-17 19:23:47 EST
In lvm2-2.02.30-1.el5.
Comment 5 Corey Marthaler 2008-03-31 13:10:52 EDT
fix verified in lvm2-2.02.32-2.el5.

[testmonkey@hayes-03 ~]$ /usr/sbin/lvdisplay
  WARNING: Running as a non-root user. Functionality may be unavailable.
  No volume groups found
[testmonkey@hayes-03 ~]$ /usr/sbin/vgdisplay
  WARNING: Running as a non-root user. Functionality may be unavailable.
  No volume groups found
[testmonkey@hayes-03 ~]$ /usr/sbin/pvscan
  WARNING: Running as a non-root user. Functionality may be unavailable.
  /var/lock/lvm/P_global: open failed: Permission denied
  Unable to obtain global lock.
Comment 7 errata-xmlrpc 2008-05-21 11:39:49 EDT
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 the 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-0378.html

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