From owner-freebsd-questions@FreeBSD.ORG Sat Feb 19 21:03:01 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 4588F16A4CE for ; Sat, 19 Feb 2005 21:03:01 +0000 (GMT) Received: from pigwidgeon.lancs.ac.uk (pigwidgeon.lancs.ac.uk [148.88.0.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8340C43D5D for ; Sat, 19 Feb 2005 21:03:00 +0000 (GMT) (envelope-from paul@theharbour.eclipse.co.uk) Received: from marl.lancs.ac.uk ([148.88.1.10]) by pigwidgeon.lancs.ac.uk with esmtp (Exim 4.43) id 1D2bkh-0002za-RT for freebsd-questions@freebsd.org; Sat, 19 Feb 2005 21:02:59 +0000 Received: from [10.34.64.106] (helo=paul1) by marl.lancs.ac.uk with esmtp (Exim 3.36 #1) id 1D2bkh-0001iE-00 for freebsd-questions@freebsd.org; Sat, 19 Feb 2005 21:02:59 +0000 From: "Paul" To: Date: Sat, 19 Feb 2005 21:03:21 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <503e8b5805021912423ca61250@mail.gmail.com> Thread-Index: AcUWw5tO1XJqIBKZR3uxVUEk5O1LagAArAXA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-Id: Subject: RE: shell_exec sudo problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2005 21:03:01 -0000 Found the problem in the log file - the sudo command wasn't being found. Thanks! -----Original Message----- From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Bas Essers Sent: 19 February 2005 20:43 To: freebsd-questions@freebsd.org Subject: Re: shell_exec sudo problem 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 _______________________________________________ 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"