Find the answer to your Linux question:
Results 1 to 2 of 2
I am using (2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 20:52:10 UTC 2011 x86_64 GNU/Linux) I have created a character device, the module compiles and instmod is successful. Code: make sudo ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    1

    mknod permission denied


    I am using (2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 20:52:10 UTC 2011 x86_64 GNU/Linux)

    I have created a character device, the module compiles and instmod is successful.
    Code:
    make
    sudo instmod mymod.ko
    Code:
    grep mymod /proc/devices | cut -b1-3
    returns 250 (major number).
    To install my module I want to use mknod, because it is proprietary and udev does not like this fact (I am trying to make it GPL but need company acceptance).
    I can do this fine:
    Code:
    sudo mknod -m 666 /dev/mymod c 250 0
    I am just curious why I need to pass the permission 666, isn't that the default for mknod?
    the man says
    set file permission bits to MODE, not a=rw - umask
    If I remove the mode switch i.e.:
    Code:
    sudo mknod /dev/mymod c 250 0
    will give me "permission denied" message.

    thanks

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,445
    I don't understand - udev should not be concerned with your license. What problem are you having with it. As for mknod, I think the default is your umask setting, which is probably not 666.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •