From nobody@FreeBSD.ORG Sun Aug 15 11:14:17 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 490BF14E3B; Sun, 15 Aug 1999 11:14:17 -0700 (PDT)
Message-Id: <19990815181417.490BF14E3B@hub.freebsd.org>
Date: Sun, 15 Aug 1999 11:14:17 -0700 (PDT)
From: papowell@astart.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: /usr/src/usr.bin/chown should be /usr/src/bin/chown
X-Send-Pr-Version: www-1.0

>Number:         13156
>Category:       bin
>Synopsis:       /usr/src/usr.bin/chown should be /usr/src/bin/chown
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sheldonh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 15 11:20:01 PDT 1999
>Closed-Date:    Wed Aug 18 06:35:23 PDT 1999
>Last-Modified:  Wed Aug 18 06:36:49 PDT 1999
>Originator:     Patrick Powell
>Release:        3.2-Release, also 4-current
>Organization:
Astart Technologies
>Environment:
See above
>Description:
chown is used by /dev/MAKEDEV, and is needed to create
devices.  If you are trying to recover from a failed disk or
install a new disk and chown is not available in /bin or /sbin
you cannot create the necessary device nodes.

Note that mknod is in /sbin, chmod is in /bin,  but chown is in /usr/bin
which is a very odd place for it.  It should probably be in /sbin or /bin

Patrick Powell

(Note:  I am surprised this has not become more visible)
>How-To-Repeat:
Ummm... crash your system,  and have only root available,
do:
mount -u /
cd /dev
MAKEDEV sd0
and see the error messages
>Fix:
mv /usr/src/usr.bin/chown /usr/src/sbin/
Update Distribution, fling it to the winds,  update change log.



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Mon Aug 16 09:54:06 PDT 1999 
State-Changed-Why:  
I'm waiting for the originator to let me know whether he's happy with me 
closing the PR. 


Responsible-Changed-From-To: freebsd-bugs->sheldonh 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Mon Aug 16 09:54:06 PDT 1999 
Responsible-Changed-Why:  
I'll wait for feedback. :-) 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: papowell@astart.com
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/13156: /usr/src/usr.bin/chown should be /usr/src/bin/chown 
Date: Mon, 16 Aug 1999 18:55:20 +0200

 > >How-To-Repeat:
 > Ummm... crash your system,  and have only root available,
 > do:
 > mount -u /
 > cd /dev
 > MAKEDEV sd0
 > and see the error messages
 
 Indeed, they're ugly, but they're not fatal and don't stop you getting
 your system far enough for you to be able to mount /usr .
 
 While this _is_ annoying, it's all but cosmetic. Both OpenBSD nor
 NetBSD have their chown in /usr/sbin . Personally, I'm not wild about
 having any more statically linked programs in the base system than are
 absolutely necessary.
 
 So, given that you don't actually _need_ chown to get the system back up
 on its feet, do you still think chown should be /sbin ? :-)
 
 Later,
 Sheldon.
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: papowell@astart.com
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/13156: /usr/src/usr.bin/chown should be /usr/src/bin/chown 
Date: Tue, 17 Aug 1999 07:27:00 +0200

 On Mon, 16 Aug 1999 14:54:50 MST, papowell@astart.com wrote:
 
 > Ummm... yes... you do.  If you need to use /dev/MAKEDEV to do so
 > you are in deep trouble.
 
 Did you actually read my comments? I tried to explain that chown failure
 in MAKEDEV is non-fatal. So whatever it creates is owned by the uid
 under which MAKEDEV is run. Since that should be the super-user's uid,
 the fact that MAKEDEV's progeny have incorrect ownership doesn't matter
 while you're "bringing the system back from the dead".
 
 Once you've created device special files for your slices, you can mount
 the appropriate partition containing the chown command and re-run
 MAKEDEV for the appropriate devices.
 
 If you still don't agree with me, a real How-To-Repeat with
 step-by-step instructions would help. Obviously, I'd want to see that
 the absence of chown makes it _impossible_ to bring a broken system up
 in the case where the existance of chown would make it possible.
 
 Let me know what you think. Basically, I think your latter PR was valid
 and I've actioned that one. This one I'd like to close. :-)
 
 Ciao,
 Sheldon.
 
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Wed Aug 18 06:35:23 PDT 1999 
State-Changed-Why:  
The originator and I have agreed in private mail that error 
messages about a missing chown when /usr isn't mounted, while  
annoying, probably aren't a strong enough motivation to move 
chown into /sbin. 
>Unformatted:
