*BSD News Article 81555


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!uwm.edu!news-peer.gsl.net!news.gsl.net!newsfeed.internetmci.com!in1.uu.net!EU.net!news2.EUnet.fr!newsbr.eunet.fr!usenet
From: Frederic.Marand@osinet.fr (Frederic MARAND)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Why chown(2) is privileged?
Date: Sat, 26 Oct 1996 08:49:05 GMT
Organization: Groupe SEDI / Agorus SA / OSI SARL
Lines: 39
Message-ID: <54smhh$9ib@newsbr.eunet.fr>
References: <CANDY.96Oct24222129@xxx.fct.kgc.co.jp> <DzsJK6.2p8@zorch.SF-Bay.ORG>
NNTP-Posting-Host: 193.107.196.155
X-Newsreader: Forte Free Agent 1.0.82

scott@zorch.sf-bay.org (Scott Hazen Mueller) wrote:

>>Why does BSD disallow non super-user to transfer ownership of files to the
>>others?

>So non super-users cannot bypass the quota system by transferring file
>ownership to other users, e.g. bin.

>               \scott

More precisely, why would anyone bother ? The quota system is
implemented but actually non-operating on several commercial unixes. 

A reason given by HP when they first introduced the "chown" privilege
in HP-UX in 86 (release 5.18, I guess) was related to billing.
Machines at this time were still expensive, and so was disk space, so
users paying for disk occupation could reduce their bill by the simple
sequence:

chmod 777 myfile
chgrp wheel myfile
chown root myfile

This way, files would be found to belong to root and not be charged to
the user, who could however regain full ownership by another simple
sequence:

cat myfile > myotherfile
rm myfile

I think there are also some real security-related implications, but I
won't delve on these.

-------------------------
   Frederic G. MARAND
  Agorus SA / OSI SARL
Frederic.Marand@osinet.fr
-------------------------