NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Controlling access to devices in NetBSD
On Wed, Feb 03, 2021 at 11:43:55AM -0500, James Lind wrote:
> I think this is a quick question for a human to answer but I've been
> having a heck of a time trying to Google it. I'm just curious how
> NetBSD controls access to device nodes. I'm just trying to use a USB
> UART device to connect to a microcontroller dev board. In Slackware, I
> would add my user to the "dialout" group which gets read/write access
> to this class of devices. I think the /dev files are fundamentally
> different in Slackware though and are dynamically created based on
> what devices are present every time you boot the system, so if you
> wanted to change the actual permissions on /dev nodes you'd need to
> modify the config of the systems generating them (e.g. udev rules).
>
> In NetBSD, my understanding is that a bunch of /dev nodes covering
> what you're likely to need are created ahead of time on your
> filesystem. If you need a device node beyond this, you create it with
> mknod and it persists on your filesystem. Therefore, I think the way
> I'm supposed to allow a normal user to access /dev/ttyU0 is to simply
> 'chmod 660' it as it already has the group wheel (which my user
> account is a member of), but its current permissions are 600. This
> change should persist because the node is essentially a file on the
> filesystem instead of being generated every boot.
>
> Just wanted to make sure this is actually the convention in NetBSD and
> I'm not setting myself up for headaches later on :). My question is
> simply is my understanding correct?
It is !
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index