Subject: Re: install(1) vs. chown change
To: None <current-users@NetBSD.ORG>
From: Dave Sainty <>
List: current-users
Date: 03/07/1998 16:59:34
Todd Vierling writes:

> I reread PR #3563 today relating to some annoyances in building a couple
> packages, and I have thought about how to allow a very slim set of
> circumstances through install(1) to allow -o/-g (set owner and group) to
> fail silently when the user is not root.  I have the following diff. 
> What this does here is allow fchown() to fail silently only if:
> - errno is equal to EPERM
> - the user is not root
> - the mode of the file to be set is not setuid, setgid, or sticky
> If any of these four conditions are false, install(1) will still exit as
> usual.

This seems like a scary change to me.  It doesn't seem so unreasonable
to add an option that enables this behaviour.  As far as packages are
concerned, I think it would be nice if several high-level conditions
were indicated in the package makefile to indicate whether packages
will create setuid binaries, or requires files to have special
ownerships.  Then the majority of the packages could be installed
using this install behaviour without any concern (possibly by setting
install flags based on whether the installer is root somewhere in

I would also have liked to know that xmcd was being installed setuid
root, because it never occurred to me. :)  Also, it doesn't appear to
be necessary, so perhaps this behaviour could be changed?  But it
would have been nice if the package system pointed out at the outset
that setuid binaries were going to be installed.

But I would prefer to be installing packages as some other user, like
bin, or probably in fact "pkgbin".  It would be nice if the package
system knew when root was and wasn't required.