From owner-freebsd-questions Sat Nov 30 7:21:23 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D791737B401 for ; Sat, 30 Nov 2002 07:21:21 -0800 (PST) Received: from catv-50622a7a.nyircatv.broadband.hu (catv-50622a7a.nyircatv.broadband.hu [80.98.42.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3132143E9C for ; Sat, 30 Nov 2002 07:21:20 -0800 (PST) (envelope-from andrew@kronos.HomeUnix.com) Received: from slave.east.ath.cx (witch@slave.east.ath.cx [10.1.1.1]) by catv-50622a7a.nyircatv.broadband.hu (8.12.6/8.12.6) with ESMTP id gAUFLCSq026490 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 30 Nov 2002 16:21:13 +0100 (CET) (envelope-from andrew@east.ath.cx) Date: Sat, 30 Nov 2002 16:21:12 +0100 (CET) From: Andrew Prewett Reply-To: Andrew Prewett To: Kirk Bailey Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Run as owner In-Reply-To: <3DE83EE1.60400@netzero.net> Message-ID: <20021130162024.V47670-100000@slave.east.ath.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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