LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-20-2004, 02:24 PM   #1
Zotty
LQ Newbie
 
Registered: Sep 2004
Location: Netherlands
Distribution: Debian testing
Posts: 25

Rep: Reputation: 15
ioperm - operation not permitted when using fakeroot


I'm trying to get hardware access through the use of ioperm(). However, when running the program as a normal user, I get an "operation not permitted" error (UID is 1000). No problem here, as this is as it's supposed to be.
But running it as fakeroot does not help as it produces the same error (UID is 0). And this I don't get.

What am I doing wrong here?

Code:
// get access to I/O port
if (ioperm( 0x378, 3, 1 )) {
	perror("ioperm");
}
Btw, root is the owner of the app.
 
Old 09-20-2004, 05:17 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
fakeroot doesn't give you any more access to the system.

Want normal user to be able to access that port? Then you have to make that program suid-root.
eg. "chmod 4755 foo" and "chown root foo".
 
Old 09-21-2004, 07:22 AM   #3
Zotty
LQ Newbie
 
Registered: Sep 2004
Location: Netherlands
Distribution: Debian testing
Posts: 25

Original Poster
Rep: Reputation: 15
Well, got sudo installed now and that works fine. Always thought fakeroot and sudo were the same....

I'll give your suggestion a spin aswell
 
Old 09-21-2004, 04:34 PM   #4
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
well, what fakeroot does it wraps some chmod operations so that there comes no error-messages when some installation scripts are doing their tricks. IIRC it also remembers those permissions so that when something is archived to a tar package, those go right just like if they where really changed.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
PHP: operation not permitted Beju Programming 6 08-28-2005 10:34 AM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 09:27 PM
operation not permitted jamaso Slackware 2 05-08-2004 05:55 AM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 05:13 PM


All times are GMT -5. The time now is 01:36 AM.

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