Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Apr 2005 15:11:18 +0100
From:      Freminlins <freminlins@gmail.com>
To:        tim@tjstephens.com, freebsd-questions@freebsd.org
Subject:   Re: set-uid bit: where am I going wrong?
Message-ID:  <eeef1a4c05041107111f868d4c@mail.gmail.com>
In-Reply-To: <20050411135117.GA5816@tjstephens.com>
References:  <20050411135117.GA5816@tjstephens.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 11, 2005 2:51 PM, Tim Stephens <tim@tjstephens.com> wrote:

> Clearly the file is owned by root, and I kept it as part of my group. I've read the man pages, and believe that when I call the script, it will assume root's permissions. It doesn't, so where am I going wrong?

FreeBSD does not support setuid scripts. They are inherently insecure.
You have some options though to your problem. You could run the script
directly as root, which is what you are trying to do. Or you could
write a wrapper round your script, which may seem like overkill.

Given that you trust your script enough to try to run it setuid, I
would go for the first option. Make sure the script cannot be altered
by anyone other than root, then run it as root.

> Thanks,
> Tim

Frem.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eeef1a4c05041107111f868d4c>