[nycbug-talk] anyone know why install functions this way?

John Baldwin jhb at freebsd.org
Tue Dec 13 11:58:46 EST 2011

On Monday, December 12, 2011 12:09:30 pm Isaac Levy wrote:
> To interrupt the chirping crickets,
> On Dec 9, 2011, at 8:08 PM, Matthew Story wrote:
> > install -o root -d foo/
> > 
> > Will create the directory with my user and effective group id, and my 
umask ... and yield an error message ... but still exit 0 (success).  At the 
very least I would expect the directory to linger with these permissions and 
exit non-zero (failure) ... this is also not consistant with the behavior of 
> > 
> > Anyway ... anyone know a historical reason for this, or have a good hack 
around this ... getting patches into section 1 to trickle down into my world 
takes a while, assuming the behavior is even a bug ...
> yadda yadda ancient 4.2BSD specific implementation of install(1) over gnu 
make builtin...

Actually, the install -d bits were added to FreeBSD (at least) in 1996, they
didn't come from 4.2BSD.  (Have to do some svn annotate dumpster diving.)  
Looks like chown/chmod failures were non-fatal from the start.  Hmm, in 
NetBSD's history install -d briefly error'd if the chown/chmod failed, but
that was changed to a warning when 4.4BSD lite was imported, so presumably
install -d was in 4.4BSD at least.

John Baldwin

More information about the talk mailing list