From owner-freebsd-questions@FreeBSD.ORG Sat Feb 19 20:42:38 2005 Return-Path: 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 7F06E16A4CE for ; Sat, 19 Feb 2005 20:42:38 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1239B43D2F for ; Sat, 19 Feb 2005 20:42:38 +0000 (GMT) (envelope-from bassers@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so97501rnf for ; Sat, 19 Feb 2005 12:42:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=GsJLYlhyp6oN8ZdlHdi3Y5ajN/APg+ptRPolZMx/u0Q0erGzRHIZKP5PGPEqPWFYZIaD0XTE4HCXL1LK2eUiJIIZQgeuNAEqWLJ2FFuquKFfUPdAqxL6QzNBFTD2af6KscHxY/VPFA5f0a3MBNwwMYSDucEsqKt4SsoeHdJQ+Co= Received: by 10.38.79.24 with SMTP id c24mr2782rnb; Sat, 19 Feb 2005 12:42:37 -0800 (PST) Received: by 10.38.70.59 with HTTP; Sat, 19 Feb 2005 12:42:36 -0800 (PST) Message-ID: <503e8b5805021912423ca61250@mail.gmail.com> Date: Sat, 19 Feb 2005 21:42:36 +0100 From: Bas Essers To: freebsd-questions@freebsd.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: Subject: Re: shell_exec sudo problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bas Essers List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2005 20:42:38 -0000 you should take a look at apache error log to see what sudo says. i''ve never used sudo but when i make a shell script SUID 0, bash tells me it is too dangerous to run a script in SUID 0. and that's probably true because a lot can be modified in a script thru the environment. On Sat, 19 Feb 2005 18:50:45 -0000, Paul wrote: > For some reason I can't get sudo to work from an online php script using > shell_exec. > > I have put this in the sudoers file: > > www ALL=(ALL) ALL > > (full access is temporary until I get it working) > > When I run: > > echo shell_exec("sudo echo hello"); > > in a php script in a web page running on apache2, it does nothing - I don't > get any feedback. > > echo shell_exec("whoami"); confirms that www is the correct user. > > Any ideas? > > Paul > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > -- Met vriendelijke groet, Bas Essers