[Dev] setuid question

Peter Long petelong at petelong.com
Thu Aug 14 11:48:26 EDT 2003


Scott Lundgren said:
>
>
>>I know that this must be something that has been done before and that
>> there is a right way and a wrong way to do it. I am most likely doing
>> it the wrong way.
>>
>>Any pointers in the right direction would be appreciated.
>
> Since you've created a user and a group to run the daemon, and you want
> that user to own the process why not look at how the /etc/rc.d/init.d
> scripts are written ?

Scott and Jon,

Thanks for the help. Not surprisingly there seems to be several ways to do
this. Also it seems that I cannot do exactly what I was hoping to do.
Which was to allow anyone in a particular group to kill the process. I
will have to beg the administrator to give us sudo rights to kill it.

Jon, is there any particular advantage to using setuid() in the code
versus using chmod 6xxx on the binary? It seems to result in the same
thing.

-- 
Peter Long





More information about the Dev mailing list