Bug 656394 - non root user can no longer view lvm devices
Summary: non root user can no longer view lvm devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Alasdair Kergon
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On: 620571
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-23 16:22 UTC by Corey Marthaler
Modified: 2011-07-21 12:29 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.02.84-3
Doc Type: Bug Fix
Doc Text:
This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause What actions or circumstances cause this bug to present. Consequence What happens when the bug presents. Fix What was done to fix the bug. Result What now happens when the actions or circumstances above occur. Note: this is not the same as the bug doesn’t present anymore.
Clone Of: 620571
Environment:
Last Closed: 2011-07-21 10:51:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1071 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2011-07-21 10:50:01 UTC

Description Corey Marthaler 2010-11-23 16:22:04 UTC
+++ This bug was initially created as a clone of Bug #620571 +++

Description of problem:
[testmonkey@taft-02 root]$ lvs
  /etc/lvm/lvm.conf: stat failed: Permission denied

[testmonkey@taft-02 root]$ cat /etc/lvm/lvm.conf
cat: /etc/lvm/lvm.conf: Permission denied

[testmonkey@taft-02 root]$ exit
exit

[root@taft-02 ~]# ls -lrt /etc/lvm/lvm.conf
-rw-r--r--. 1 root root 21640 Aug  2 14:22 /etc/lvm/lvm.conf

There used to be a message when running as non root:
"WARNING: Running as a non-root user. Functionality may be unavailable."

Version-Release number of selected component (if applicable):
2.6.32-52.el6.x86_64

lvm2-2.02.72-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
lvm2-libs-2.02.72-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
lvm2-cluster-2.02.72-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
udev-147-2.21.el6    BUILT: Mon Jul 12 04:55:00 CDT 2010
device-mapper-1.02.53-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
device-mapper-libs-1.02.53-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
device-mapper-event-1.02.53-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
device-mapper-event-libs-1.02.53-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
cmirror-2.02.72-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010


How reproducible:
everytime

--- Additional comment from agk on 2010-11-22 16:31:11 EST ---

So what's going on here?

Are the /etc/lvm directory permissions wrong now?
Or is it selinux?

(And how did this trivial bugzilla not get noticed since August?)

--- Additional comment from agk on 2010-11-22 16:34:17 EST ---

Is /etc/lvm being given wrong permissions?  It should be mode 0755 so that lvm.conf is readable.  Looks wrong in the Fedora package I built a few hours ago.

Comment 1 Corey Marthaler 2010-11-23 16:22:59 UTC
This exists in the latest 5.6 rpms as well. 

[testmonkey@taft-04 root]$ lvs
  /etc/lvm/lvm.conf: stat failed: Permission denied
[testmonkey@taft-04 root]$ pvscan
  /etc/lvm/lvm.conf: stat failed: Permission denied


lvm2-2.02.74-3.el5    BUILT: Thu Nov 11 02:56:33 CST 2010
lvm2-cluster-2.02.74-3.el5    BUILT: Tue Nov  9 08:01:59 CST 2010
device-mapper-1.02.55-2.el5    BUILT: Tue Nov  9 06:41:00 CST 2010
device-mapper-event-1.02.55-2.el5    BUILT: Tue Nov  9 06:41:00 CST 2010
cmirror-1.1.39-10.el5    BUILT: Wed Sep  8 16:32:05 CDT 2010
kmod-cmirror-0.1.22-3.el5    BUILT: Tue Dec 22 13:39:47 CST 2009

Comment 3 Alasdair Kergon 2011-02-09 20:46:37 UTC
Fixed upstream a while ago.

Comment 4 Milan Broz 2011-03-01 15:58:16 UTC
Fixed in lvm2-2.02.84-1.el5

Comment 7 Corey Marthaler 2011-04-25 22:35:06 UTC
Still seeing "Failed to create dm_task struct to check dev status" messages when running 'lvs'.


[testmonkey@taft-01 root]$ pvscan
  WARNING: Running as a non-root user. Functionality may be unavailable.
  /var/lock/lvm/P_global:aux: open failed: Permission denied
  Unable to obtain global lock.

[testmonkey@taft-01 root]$ pvs
  WARNING: Running as a non-root user. Functionality may be unavailable.
  /var/lock/lvm/P_global:aux: open failed: Permission denied
  Unable to obtain global lock.

[testmonkey@taft-01 root]$ lvs
  WARNING: Running as a non-root user. Functionality may be unavailable.
  /dev/mapper/control: open failed: Permission denied
  Failure to communicate with kernel device-mapper driver.
  Failed to create dm_task struct to check dev status
  Failed to create dm_task struct to check dev status
  Failed to create dm_task struct to check dev status
  No volume groups found

[testmonkey@taft-01 root]$ lvcreate
  WARNING: Running as a non-root user. Functionality may be unavailable.
  /dev/mapper/control: open failed: Permission denied
  Failure to communicate with kernel device-mapper driver.
  striped: Required device-mapper target(s) not detected in your kernel
  Run `lvcreate --help' for more information.

Comment 8 Milan Broz 2011-04-26 10:25:16 UTC
No wonder that it fails, the chunk removing that message is not in build for some reason (but it is upstream).
Moving ot POST for now, will fix in next rebuild.

Comment 9 Milan Broz 2011-04-27 10:00:48 UTC
Patch in lvm2-2.02.84-3.

Comment 11 Corey Marthaler 2011-04-27 19:33:27 UTC
Fix verified in lvm2-2.02.84-3.el5

[testmonkey@taft-01 root]$ lvs
  WARNING: Running as a non-root user. Functionality may be unavailable.
  /dev/mapper/control: open failed: Permission denied
  Failure to communicate with kernel device-mapper driver.
  No volume groups found

Comment 13 Florian Nadge 2011-05-26 14:57:14 UTC
    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:
This field is the basis of the errata or release note for this bug. It can also be used for change logs.

The Technical Note template, known as CCFR, is as follows:

Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.
Result
    What now happens when the actions or circumstances above occur.
    Note: this is not the same as the bug doesn’t present anymore.

Comment 14 errata-xmlrpc 2011-07-21 10:51:17 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-2011-1071.html

Comment 15 errata-xmlrpc 2011-07-21 12:29:03 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-2011-1071.html


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