Subject: Re: single user mode file comparisons
To: William Allen Simpson <wsimpson@greendragon.com>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 06/08/2003 20:13:56
[ On Sunday, June 8, 2003 at 18:14:07 (-0400), William Allen Simpson wrote: ]
> Subject: single user mode file comparisons
>
> There is some guidance in the "Filesystem Hierarchy Standard", for 
> "UNIX-like operating systems", although somewhat Linux oriented.
>   http://www.pathname.com/fhs/pub/fhs-2.2.pdf

I wouldn't put much stock in that document as a "Standard" if I were
you.  :-)

On the other hand it does give this very good piece of general advice
(though unfortunately only in a footnote):

   [16] Deciding what things go into "sbin" directories is simple:  if a
   normal (not a system administrator) user will ever run it directly,
   then it must be placed in one of the "bin" directories.  Ordinary
   users should not have to place any of the sbin directories in their
   path.

FYI on my own NetBSD systems I move 'awk' and 'fgrep' to /bin because
I've made use of them in some of my own /etc/rc* scripts.  I do this
even though I don't really support the idea of making /usr a separate
filesystem.

Note that in my implementation I use The One True Awk (not GNU Awk), as
well as non-GNU versions of fgrep (and grep/egrep).  I have 'cpio' and
'tar' in /bin too because I've been using their 'pax' variants for some
time now.  I no longer have /bin/csh (indeed almost all remnants of csh
have been removed from my systems).

> Of these, chgrp is in /rescue, and required for /bin by FHS.

If "chgrp" is required in /bin by this so-called "FHS" then that
document flawed and not really compatible with POSIX-1003.1-2001 since
the latter requires that all the "chgrp" functionality be also available
through "chown".  This is especially true in single user mode where the
user is the superuser and thus the potential restrictions of "chown" do
not apply.

As I understand it "chgrp" is only kept separately defined and has not
been deprecated in POSIX-1003.1 so that it can be put in a directory
that is by default in the user's path while "chown" can be put off out
of harm's way in a "system" directory (/sbin or /usr/sbin) on those
systems where non-privileged users are not allowed to change user
ownership but rather only group ownership.

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>