Bug#342455: tech-ctte: Ownership and permissions of device mapper block devices
-----BEGIN PGP SIGNED MESSAGE-----
Bastian Blank <email@example.com> writes:
> On Sat, Dec 17, 2005 at 12:41:17PM +0000, Roger Leigh wrote:
>> > Which procedure? You seem to know something I don't know. ("Overwrite"
>> > means in my context: chmod of static devices or a MODE setting in the
>> > udev config)
>> A chown/chmod of the device is not scalable or practical.
> You recreate the complete /dev?
lvcreate/vgchange and related commands will create the devices with
the default ownership, and hence require *manual* correction after
their creation. Thus chown/chmod are not practical for anything but
tiny and unchanging installations.
>> a new LV, the permissions will be wrong. If I run vgchange, the
>> permissions will be wrong. This is not a solution.
> And I don't speak about libdevmapper managed device.
Please could you clarify? What *are* you speaking about. I'm
referring to the fact that when I create or change an LVM LV, I have
to manually correct the permissions (on both static and udev managed
It would make this problem a whole lot easier if you could explain in
some detail about your reasoning and thoughts, so that we don't have
>> What if the user isn't using udev?
> There are only 2 versions, static dev or udev, so which one is missing?
Let's examine the two cases, using the default setup Debian provides
Static device nodes
* /dev is static, with devices created by MAKEDEV.
* /dev/mapper, and related symlinks are still not static, they are
created and removed by devmapper (vgscan, vgchange, lvchange etc.),
with the default ownership and permissions of root:root 0600. If
you don't like those permissions, you have to change them manually.
* /dev is managed by udev, using udev rules
* /dev/mapper and related symlinks are ignored by udev (there are no
rules), and it is still managed by devmapper (see below).
>> Do you have any example udev rules to do what you suggest?
> SUBSYSTEM=="block", MODE="0600"
That changes the default permissions for block devices, but this is
not what I meant.
How do I get device-mapper devices to be created by udev, along with
the related symlinks? The rule you suggest above does not in any way
affect the *device-mapper* device permissions or ownership, which is
the problem at hand:
Take a look at the default udev behaviour in /etc/udev/udev.rules:
# device mapper creates its own device nodes, so ignore these
Unless you have some udev rules that solve the problem, udev is not
the solution because it delegates all responsibility to devmapper.
Also, you have not addressed the case where udev is not in use: the
ownership and permissions are still wrong.
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>
-----END PGP SIGNATURE-----