LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-02-2014, 11:46 AM   #1
svenh
LQ Newbie
 
Registered: Aug 2014
Posts: 2

Rep: Reputation: Disabled
Permission issue?


I have written an application that is accessing a "dongle" in the USB port.
The dongle came with a library (.so) for Linux.
If I start the program with sudo, everything works fine.
Without sudo the program works but the dongle can't be accessed.
LoadLibrary works but calls to the library returns error codes.

Both my program and the library has all permissions and are both root.

-rwxrwxrwx 1 root root

I'm using Mint 17 64 bit on a VM on a MacBook Pro.

Thankful for any help.
 
Old 09-02-2014, 07:49 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

presumably the dongle shows up as a device under /dev. Presumably the user running the program will need at least read permissions for that device. So what are the owner and group of the device and what are the permissions?

Evo2.
 
Old 09-03-2014, 12:06 PM   #3
svenh
LQ Newbie
 
Registered: Aug 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Should not a program with root and all permissions be able to access everything?
What is the difference between running a program with sudo and running the program as root with all permissions?
It does not look to me as a hardware permission issue.
 
Old 09-03-2014, 12:24 PM   #4
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Don't confuse running permissions with file permissions ... Unless the SUID bit is specified (and please don't) the file will always run with the user that is running the actual command... Ofcourse, when sudoing that user is root..

See what permissions the device has and add the user you wish to have access there to that group... Or, search and configure udev rules so that the device will have different permissions...
 
Old 09-03-2014, 05:43 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by svenh View Post
Should not a program with root and all permissions be able to access everything?
If by "all" you mean rwx, then no.
Quote:
What is the difference between running a program with sudo and running the program as root with all permissions?
The user running the program and the owner of the program are two completely different things.
Quote:
It does not look to me as a hardware permission issue.
Sorry, but your understanding of this is off. Please check the ownership and permissions of the device as I requested in my previous post.

Evo2.
 
  


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
Permission Issue?? bradshaw79 Linux - Server 1 01-10-2014 10:31 AM
[SOLVED] Permission Issue xavinux Linux - Server 10 11-08-2011 06:17 AM
permission's issue bibiki Linux - Desktop 1 05-06-2011 11:10 AM
permission issue user52 Linux - Newbie 4 01-02-2011 02:03 AM
Issue with permission? your_shadow03 Linux - Server 1 11-22-2009 06:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:28 PM.

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
Open Source Consulting | Domain Registration