Device node access permissions in Linux
I'm writing a char device driver for embedded android. The device module, register itself as a char device, and a corresponding device node is created under /dev . The problem is that the access permissions for this device is for root, and I can't read it from android applications (JNI). I have to manually "chmod +r" the device before running the application. How can I decide the access permission of a dynamically created device node ?
To start with, you might get more detailed help at the LQ sister site:
Now, while I'm not a kernel developer, most Linuxes these days use udev rules to populate the /dev directory.
This may not apply to embedded systems, however. According to this thread, which I found through a quick search, it looks like android relies on init.rc to do the dirty work. See the last comment.
Search engines are quite useful things, don't you think?
|All times are GMT -5. The time now is 04:09 PM.|