Re: root.root and netdev group for /dev/net/tun ?
Le 28/07/2013 04:19, Stephen Powell a écrit :
> On Sat, 27 Jul 2013 21:28:09 -0400 (EDT), Zenaan Harkness wrote:
>> Is there a reason why the default ownership of /dev/net/tun is root.root?
>> I'm on sid. Don't know if it's anything I did, pretty sure not.
>>
>> As in, is there a reason that /dev/net/tun is not owned root.netdev?
> The attributes of /dev/net/tun are controlled by the file
>
> /lib/udev/rules.d/91-permissions.rules
>
> which is part of the udev package. Search for the character string "tun"
> in this file. You will find a line which looks like this:
>
> KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"
>
> If you want to change the group to netdev, change the above to
>
> KERNEL=="tun", GROUP="netdev" MODE="0666", OPTIONS+="static_node=net/tun"
>
> You might also want to change the mode settings, so that only root and members
> of the netdev group can access the /dev/net/tun device. For example,
>
> KERNEL=="tun", GROUP="netdev" MODE="0660", OPTIONS+="static_node=net/tun"
>
> As for why it is the way it is, you might want to ask the package maintainer for
> the udev package that question. Of course, if the udev package is ever serviced,
> you may need to re-make your changes. The change does not take effect until the
> next reboot, of course.
>
I think that what is found in /etc/udev/rules predates /lib/udev/rules,
thus just putting the modified line in a file in this directory should
be sufficient and shoud survive an udev update.
Reply to: