[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: root.root and netdev group for /dev/net/tun ?



On Sat, 27 Jul 2013 22:19:42 -0400 (EDT), Stephen Powell wrote:
> 
> 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"
> 

One other thing -- 91-permissions.rules is in the initial RAM file system;
so if you change 91-permissions.rules, you will need to rebuild the initial
RAM file system image file.

   update-initramfs -uk $(uname -r)

will rebuild the initial RAM file system image file for the running kernel.
If you have alternate kernels installed, you will need to rebuild the initial
RAM file system image files for the alternate kernels too.

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-


Reply to: