set-uid bit: where am I going wrong?

Freminlins freminlins at gmail.com
Mon Apr 11 07:11:21 PDT 2005


On Apr 11, 2005 2:51 PM, Tim Stephens <tim at 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.


More information about the freebsd-questions mailing list