Re: RedHat Question

From: Jared Still <>
Date: Thu, 8 May 2008 09:59:59 -0700
Message-ID: <>

On Thu, May 8, 2008 at 6:18 AM, Roman Podshivalov <> wrote:

> Jared,
> To run it with root privileges you have to have a SUID bit set and use
> setuid(geteuid) routine in your code. But If memory serves me correctly if
> you set it first before chown your script to root it'll disappear (just to
> prevent such a security hole). And once script belongs to root you cannot
> set SUID bit on it anyway 8-)
> --romas

It's been awhile, but I've done just that on older versions of Unix.

Something like 'create script, chmod u+s script, chown root script'

Which is why it is normally no longer possible.

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Received on Thu May 08 2008 - 11:59:59 CDT

Original text of this message