Problems with setuid app in Ubuntu 12.04
Paul Smith
paul at mad-scientist.net
Sun May 13 07:32:22 UTC 2012
On Sat, 2012-05-12 at 16:29 -0400, Paul Smith wrote:
> >> Failed to setuid to root. Error 1: Operation not permitted
>
> I agree that looks identical to my problem; unfortunately there's no
> followup with any sort of solution or anything.
Oy vey. I figured it out. It was a terrible confluence of two bizarre
things: the first one was that I somehow had copied an instance of the
binary that was supposed to be setuid into my home directory, where of
course after the copy it was no longer setuid. I have no idea how or
why I would have done such a thing.
And the second one is that the Java UI appears to be specifically
searching the current directory BEFORE it looks on $PATH (I never have
"." in my $PATH for security reasons).
This means the Java UI was invoking the non-setuid copy of the program
from my home directory even though neither my current directory nor my
home directory is on my $PATH.
What a drag, to have spent so much time on this. I've updated my
scripting to force a cd to the right directory before launching the Java
UI program and that seems to solve the problem (even if I don't delete
the stray program from my home directory).
Sorry for the confusion/noise. Cheers!
More information about the ubuntu-users
mailing list