From owner-freebsd-questions Thu Jan 3 9:11:51 2002 Delivered-To: freebsd-questions@freebsd.org Received: from chaos.evolve.za.net (chaos.evolve.za.net [196.34.172.107]) by hub.freebsd.org (Postfix) with ESMTP id 5A31737B41C for ; Thu, 3 Jan 2002 09:11:46 -0800 (PST) Received: from DAVE ([192.168.0.56]) by chaos.evolve.za.net (8.11.6/1.1.3) with SMTP id g03HBHI35347; Thu, 3 Jan 2002 19:11:18 +0200 (SAST) (envelope-from dave@kill-9.za.net) Message-ID: <002f01c19479$3d688c20$3800a8c0@DAVE> From: "Dave Raven" To: "Yonatan Bokovza" , References: Subject: Re: Setuid. Date: Thu, 3 Jan 2002 19:08:16 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 Yes, but the perl program needs to run another program as root. No variables are passed or anything. What it does is get a version number for a program (from kernel) Later I will need to add rules (bandwidth manager) and this HAS to be done from the web and as root. Is there a better way, or how do I do it this way? ----- Original Message ----- From: "Yonatan Bokovza" To: "'Dave Raven'" ; Sent: Thursday, January 03, 2002 6:56 PM Subject: RE: Setuid. > > -----Original Message----- > > From: Dave Raven [mailto:dave@kill-9.za.net] > > Sent: Thursday, January 03, 2002 18:51 > > To: freebsd-questions@FreeBSD.org > > Subject: Setuid. > > > > > > Hello, > > I need to run a perl program as root from the web (web > > user = nobody) > > These are the permissions I have given the file: > > -rwsr-xr-x 1 nobody nobody 1447 Jan 3 15:42 bwutil.pl > > > > As a non root user: > > su-2.05$ /usr/optec/bwutil.pl > > Can't do setuid > > The permission on that file should be: > -rwsr-xr-x 1 root nobody 1447 Jan 3 15:42 bwutil.pl > > But running SUID-root files from web is a Bad Thing(tm). > Try not to do that. > > > I'm sure there must be a better way to do this, but if > > not how should I > > proceed? > > > > Thanks, > > Dave. > > OpteqSec. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message