I can setuid binaries, but it doesn't work! Help.
Hi..
Ok, I have a C program, 'prog.c' that does system('ls /root'); 1. Its compiled(gcc -o prog prog.c), and runs fine, under root. Root owns this file. I want anyone else to be able to view /root, so I do: chmod 4755 prog ls -l prog -rwsr-xr-x 1 root root 11221 2005-03-25 21:34 prog So prog is now setuid...to run under root from any user. 2. But I keep getting permission denied when ran by any user except root. WHY?? It's really wrecking my head. Note: I have tried the same idea between two different normal users, just in case there was some protection against setuiding root files. I'm using slackware 10.1, and havn't messed around with kernel settings. I know linux disabled setuid for scripts, bit this file 'prog' is a binary. Please help. :confused: ps. I know prog.c is a stupid program, I'm just using it as an example. Thanks! boing |
What about chmod 6755 prog? That usually works for me... (shouldn't really be any different tho)
|
Yeah I tried that too...
Thanks tho! boing |
Is the partition you're running it on mounted nosetuid? If that's the case, setuid binaries won't work on it. You can check this in /etc/mtab.
|
Hi...
Nope, i checked that also...That's why I've no idea why this isn't working :( Does slackware 10.1 somehow block setuit? |
All times are GMT -5. The time now is 12:50 PM. |