From owner-freebsd-questions Mon Mar 10 20:38: 0 2003 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 984F137B404 for ; Mon, 10 Mar 2003 20:37:58 -0800 (PST) Received: from mail1.nmu.edu (mail1.NMU.EDU [198.110.192.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CCA843FBD for ; Mon, 10 Mar 2003 20:37:57 -0800 (PST) (envelope-from plathrop@mqtweb.com) Received: from mqtweb.com ([204.38.207.11]) by mail1.nmu.edu (8.12.8/8.12.8) with ESMTP id h2B4br7P041832 for ; Mon, 10 Mar 2003 23:37:54 -0500 (EST) Date: Mon, 10 Mar 2003 23:37:53 -0500 Mime-Version: 1.0 (Apple Message framework v551) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: suid shell script From: Paul Lathrop To: freebsd-questions@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <391E822F-537B-11D7-9C72-000393BF3DE2@mqtweb.com> X-Pgp-Agent: GPGMail (v25) X-Mailer: Apple Mail (2.551) 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 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I must admit I feel silly having to ask, but I've been banging my head against this for a couple days now and I am completely stumped. I just recently switched from Slackware Linux 8.0 to FreeBSD. There are a couple of scripts I use for my own convenience that I ran setuid root on my Linux box. All that I had to do was make sure the scripts were owned by root, and then do a chmod 4711 on them to make it work in Linux. I just set up a script on FreeBSD - the first time I've actually done it since I switched. I followed the same procedure, but when I run the script as a normal user, it does not run with elevated priveleges. I've scoured the web for info on this but all I have been able to find references to are difficulties with Perl scripts. I don't know Perl (yet). I took all the extraneous stuff out of my script and boiled it down to three simple commands that I know work - just to make sure my program logic wasn't the problem. Here it is: #!/bin/tcsh mkdir $3 chown -R $1 $3 chgrp -R $2 $3 chmod -R 771 $3 So now it's down to a proof-of-concept script. If I can make this work with the elevated privileges, I can move on to the real script. Can anyone out there help me understand what I am doing wrong? Thanks, Paul D. Lathrop -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (Darwin) iD8DBQE+bWgklos2supvBQwRAtZ8AJ48Xs+FIweasAck0/Iz47mnp2VeUACfZZXr +QBNLYIcHErEwbaP6HDZBM0= =/b6N -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message