*BSD News Article 92745


Return to BSD News archive

#! rnews 1995 bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.caldera.com!enews.sgi.com!news.corp.sgi.com!news.sgi.com!news.maxwell.syr.edu!newsfeeds.sol.net!nntp.uio.no!sn.no!gsl-stkh-ns.gsl.net!news.gsl.net!eru.mt.luth.se!newsfeed2.luth.se!news.luth.se!erix.ericsson.se!erinews.ericsson.se!news
From: Jan de Visser <etmjdvi@etm.ericsson.se>
Newsgroups: comp.unix.bsd.freebsd.misc,comp.unix.misc
Subject: Re: script run as nobody with root permissions?
Date: Fri, 04 Apr 1997 08:42:40 -0800
Organization: Ericsson/ETM
Lines: 40
Message-ID: <33452F80.1760@etm.ericsson.se>
References: <3343ED80.71D3C60B@giotto.dnet.it>
Reply-To: etmjdvi@etm.ericsson.se
NNTP-Posting-Host: etmpc3117.ericsson.se
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0Gold (Win16; I)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38411 comp.unix.misc:28613

It is documented behaviour that setuid does not work for shell scripts.

(oddly enough, it works in our HP/UX 9 env. Not on SunOS however...)

JdV!!

Markus Senoner wrote:
> 
> I want to write a script (say: foobar) like:
> 
>   #!/bin/sh
>   mkdir /xxx
> 
> and run it as nobody, it obviously gives an error message:
> 
>   > ./foobar
>   mkdir: /xxx: Permission denied
> 
> when I try to set following permissions:
> 
>   -rwsr-sr-x  1 root    wheel   foobar
> 
> and try to execute the script again, it still gives:
> 
>   > ./foobar
>   mkdir: /xxx: Permission denied
> 
> I tried to put nobody in the wheel group, but still no success.
> What do I wrong?
> 
> Thanks a lot in advance!
> Markus Senoner

-- 
========================================================================
Jan de Visser			       etmjdvi@etm.ericsson.se
ETM/OPP TMOS Technical support	       jan.de.visser@nlbdafsc.origin.nl
tel. +31 161 242650
		<enter any 12 digit prime to continue>
========================================================================