LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   ioperm - operation not permitted when using fakeroot (https://www.linuxquestions.org/questions/programming-9/ioperm-operation-not-permitted-when-using-fakeroot-233034/)

Zotty 09-20-2004 02:24 PM

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.

ToniT 09-20-2004 05:17 PM

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".

Zotty 09-21-2004 07:22 AM

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 ;)

ToniT 09-21-2004 04:34 PM

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.


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