LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2011, 11:15 AM   #1
dmoyamendez
LQ Newbie
 
Registered: Oct 2011
Location: Lexington, NC
Distribution: Fedora, Ubuntu
Posts: 18

Rep: Reputation: Disabled
Permission Denied when trying to access USB device


When root, I can run the program just fine. But non-root, I get an error (defined by the program I'm trying to run) that says the device couldn't be found. Since the device can be detected when running root, I'm assuming it's a permissions problem.

I had to install a custom driver for the device to get it to work in linux, so I guess I'm thinking that non-root users don't have access to the drivers...??

Any ideas would be helpful. Thanks
 
Old 11-02-2011, 12:02 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,686
Blog Entries: 23

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Hi,

Okay, you provided half of the answer right there...

Quote:
I'm assuming it's a permissions problem.
...what you may need to do is enter Root mode and grant the non-privved user (you, in fact) the needed permissions...

It boils down to chmodding the device...and of course, give the non-privved user exec rights too:

Quote:
chmod +x /path/to/device.so
...or something to that intent...

Good luck

Thor
 
Old 11-02-2011, 12:12 PM   #3
dmoyamendez
LQ Newbie
 
Registered: Oct 2011
Location: Lexington, NC
Distribution: Fedora, Ubuntu
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks for your reply.

Unfortunately, I've already changed the owner of the .so file and just about every other file associated with the drivers... and it still doesn't work.

But here's something funny, maybe you could explain this.
When running non-root and attempting to execute the program, I get (for example) error code 1.
If I execute the program as root with the device detached from my computer, It displays error code 2.

So even as non root, I think the computer knows the device is there, but for whatever reason I can only retrieve/send data to the device as root.

eeekkk :/
 
Old 11-02-2011, 12:21 PM   #4
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,686
Blog Entries: 23

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Okay...well, try to find out what group has access to the device, and add the non-privved user to that group...

Enter this as Root, in the console:
Quote:
groups
then do the same for the user, add the user to the group that is allowed to the device

As for the exit codes, these are listed, try this one for appetisers:

Quote:
grep 64 /usr/include/sysexits.h
...and then, replace the 64 with 1 or 2...

Last edited by ButterflyMelissa; 11-02-2011 at 12:23 PM.
 
  


Reply


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
when use minicom, received "Device /dev/ttyS1 access failed: Permission denied." fulee1 Linux - Newbie 3 04-02-2010 04:11 PM
Permission Access Denied jec25 Linux - Newbie 4 02-10-2010 06:11 PM
Help: Access permission denied wegadnie Linux - Newbie 7 11-03-2008 10:18 PM
Trying to mount loop device during boot: permission denied openSauce Linux - Newbie 5 10-06-2008 01:07 PM
mounting any device in fstab = Permission denied when trying to cd without root. Romanus81 Slackware 5 06-04-2008 12:24 AM


All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration