Date: Sat, 30 Nov 2002 16:21:12 +0100 (CET) From: Andrew Prewett <andrew@kronos.HomeUnix.com> To: Kirk Bailey <idiot1@netzero.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Run as owner Message-ID: <20021130162024.V47670-100000@slave.east.ath.cx> In-Reply-To: <3DE83EE1.60400@netzero.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 29 Kirk Bailey wrote:
> OK, man says to get a script to run as the owner, turn on the 4000 bit.
If you execute a script, and the first line begins
with `#!/usr/bin/perl -w' (in case of a perl script) and the sript is
marked executable then the kernel executes it like:
exec("/usr/bin/perl", "perl", "-w", "script", NULL)
(It's not exact, just to point out that the setuid/setgid bit is
normally irrevelant on scripts)
See execve(2) for more.
>
> OK, I did. No such luck, it continues to run as the apache identity 'nobody'.
>
> Any advice?
>
If it's a `cgi' script, then you might need apache suexec.
If you have the ksh shell, try with suid_exec.
-andrew
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021130162024.V47670-100000>
