LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 08-28-2011, 03:26 AM   #1
ramonfried
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Rep: Reputation: Disabled
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 ?
 
Old 08-28-2011, 04:34 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
To start with, you might get more detailed help at the LQ sister site:

http://www.androidquestions.org/

Now, while I'm not a kernel developer, most Linuxes these days use udev rules to populate the /dev directory.

http://www.reactivated.net/writing_udev_rules.html

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.

http://www.linuxquestions.org/questi...ndroid-832703/

Search engines are quite useful things, don't you think?
 
  


Reply

Tags
devicedrivers


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access i2c device driver node farrukh_arshad Linux - Kernel 7 12-19-2012 10:05 PM
Creating A New Device Node/Not A Valid Block Device indienick Debian 4 07-13-2007 02:07 PM
usb device root permissions write access lindylex Debian 7 06-06-2007 10:41 AM
Ahhh, XSane, UDEV and Device Node Permissions? binarybob0001 Linux - Software 2 04-10-2007 12:16 AM


All times are GMT -5. The time now is 01:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration