*BSD News Article 83450


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!arclight.uoregon.edu!usenet.eel.ufl.edu!news.mathworks.com!uunet!in1.uu.net!news.gtn.com!klicman.de!ora.de!bad
From: bad@ora.de (Christoph Badura)
Subject: Re: Why chown(2) is privileged?
Message-ID: <E1AI8x.8ys@ora.de>
Organization: Verlag O'Reilly
References: <847786081.259851@panacea.insight.co.za> <E0vMsx.Bp0@cogsci.ed.ac.uk> <56r47r$3sr@uriah.heep.sax.de> <E1AECn.3rG@cogsci.ed.ac.uk>
Date: Fri, 22 Nov 1996 20:58:08 GMT
Lines: 20

In <E1AECn.3rG@cogsci.ed.ac.uk> richard@cogsci.ed.ac.uk (Richard Tobin) writes:

>In article <56r47r$3sr@uriah.heep.sax.de> joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) writes:
>>...and perhaps to prevent people from shooting in their feet.  Try
>>unpacking a tar tape/file on a SysV where the files and directories
>>are owned by root and are not writable by you

>Well, it does have that effect, but if chown were allowed, the Right
>Solution would be for tar to not chown each directory until *after*
>writing all the files and subdirectories in it.  Of course, one cannot
>expect System V to do this...

Of course, non-broken tars on SysV have chowned files only when running
as euid == 0.

-- 
Christoph Badura

Now available in print: Lion's Commentary on UNIX 6th Edition, with Source Code
			http://www.peer-to-peer.com/