Re: How create a miscellaneous "crw-rw-rw-" device ?

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

 



Hi Dave,

Thank you for your kind reply.



> 
> So you'll  either need to modify your global umask, or add a udev rule
> for your driver  which explicitly sets the mode.
> 

I use to build under my nonpriv-account but I need the root to "insmod/rmmod".
The root account has a standard "umask" of 0022. This is:

          umask -S u=rwx,g=rx,o=rx

which is not consistent with

      ls -l /dev/lab1 
      crw-rw---- 1 root root 10, 55 2010-08-16 09:52 /dev/lab1

Even if I alter the root's umask the device is still created with the same 
protection.
Here is something I do not fully understand. I have to dig more...

As you suggested as alternate method I added a udev rule:

      cat /etc/udev/rules.d/70-persistent-testlab.rules 
      SUBSYSTEM=="misc", KERNEL=="lab[1-9]", MODE="0666"

and I get:

      ls -l /dev/lab1
      crw-rw-rw- 1 root root 10, 55 2010-08-16 10:30 /dev/lab1

which is what I need in order to work with this device from my account.

Thanks again,
Stephan

p.s. Nice web site! 
I drew some inspiration from.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux