Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm having some trouble changing the owner of a Linux LVM logical volume on my Debian wheezy system. I added the following udev rule to both the initramfs and the real root file system:

SUBSYSTEM=="block",
ENV{DM_UUID}=="LVM-yYuoI8k05GWxZnz9BeEIwPUGGeojzF3dZZmXTYRqC051Tllj76OHdDlzYhKZUu7u",
OWNER="nikratio"

If I disable and re-enable this logical volume with lvchange, it gets created with the correct owner.

However, when I boot the computer, the device always ends up being owned by root:disk instead.

On the other hand, if I look at the permissions right before initramfs executes the real init, the owner is actually correct (i.e., nikratio).

So, at some point between execution of the real init and completed startup, something overwrites the owner of by device, but both before and afterward the rule gets applied correctly.

Does anyone have an idea what's happening here? How can I get this to work?

share|improve this question
    
Is a later udev rule changing it back perhaps? –  Paul Jan 10 '13 at 6:34
    
What is the specific problem you are attempting to address? In general, all disk stuff is generally owned by root for a good reason. –  mdpc Jan 10 '13 at 6:57
    
@mdpc: system is debian wheezy, as I said in the question :-). I need access to the block device so that ordinary users can use it as a qemu storage backend. –  Nikratio Jan 10 '13 at 17:04
    
@Paul: yes, most likely, but I can't find any such rule... –  Nikratio Jan 10 '13 at 17:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.