From owner-freebsd-questions Mon Oct 14 8:16:44 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 5B20237B401 for ; Mon, 14 Oct 2002 08:16:43 -0700 (PDT) Received: from office.advantage-interactive.com (host217-37-74-237.in-addr.btopenworld.com [217.37.74.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84D7043EB1 for ; Mon, 14 Oct 2002 08:16:42 -0700 (PDT) (envelope-from simond@irrelevant.org) Received: from devbox.advantage-interactive.com ([192.168.254.128] helo=linux.advantage-interactive.com) by office.advantage-interactive.com with esmtp (Exim 3.36 #1) id 1816xB-0000DP-00; Mon, 14 Oct 2002 16:16:21 +0100 Subject: Re: Running ipfw from a webpage/using php. From: Simon Dick To: Patrick Holahan Cc: questions@freebsd.org In-Reply-To: <010101c2738e$ffcd2560$ec9e1ec4@staff.uunet.co.za> References: <010101c2738e$ffcd2560$ec9e1ec4@staff.uunet.co.za> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 14 Oct 2002 16:16:21 +0100 Message-Id: <1034608581.2411.2.camel@linux> Mime-Version: 1.0 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 Mon, 2002-10-14 at 15:35, Patrick Holahan wrote: > Hi there.. > > Hopefully someone here is able to help me.. > > I need to run a root command (ipfw) from apache through php. (Yes, this is > not very secure and I'm aware of this and if anyone has any better > suggestions, please feel free to make them.) > > Would anyone know how to do this? If you have to do this, I'd suggest setting up sudo so that the user apache runs as has sudo access to run the ipfw command and nothing else. It's still not nice, but it should work. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message