Why does "root" own everything?

Chris Torek chris at mimsy.UUCP
Wed Mar 16 00:06:58 AEST 1988


In article <3755 at bloom-beacon.MIT.EDU> wesommer at athena.mit.edu
(William E. Sommerfeld) writes:
>If you're using the 4.x-oid `dump' and `restore', it's simple.  Dump
>reads the raw disk, so all you have to do is to create a `backup'
>pseudo-user and give it group read (but not write) access the raw
>devices you want to have backed up.

An easier way:

	% ls -lgd /etc /etc/{,r}dump /etc/dumpdates /dev/rra1d
	drwxr-xr-x 12 bin      bin          5120 Mar 15 05:45 /etc
	-rwxr-s---  1 bin      operator    36864 Nov 18 15:34 /etc/dump
	-rwsr-s---  1 root     operator    51200 Nov 18 15:34 /etc/rdump
	-rw-rw-r--  1 bin      operator     5544 Mar 15 08:56 /etc/dumpdates
	crw-r-----  1 root     operator   9,  11 Mar 13 19:56 /dev/rra1d
	%

This depends on the fact that new versions of /etc/dump open
/etc/dumpdates in mode `r+' and use ftruncate() to shorten the file
when necessary (hence dump and rdump no longer need write permission on
/etc).  (rdump must still run setuid-root so as to get a restricted
port.)

Incidentally, in 4.3-tahoe (and around here, ever since we installed
4.2BSD) root does not own everything.  Now `bin' owns everything that
need not be special.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list