Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fixperm(ADM) — OpenDesktop 2.0.0a

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

custom(ADM)


 fixperm(ADM)                    19 June 1992                    fixperm(ADM)


 Name

    fixperm - correct or initialize file permissions and ownership

 Syntax

    /etc/fixperm [ -acDfgilnOpsSvwX ] [ -d pkg ] [ -u pkg ] specfile

 Description

    For each line in the specification file specfile, fixperm makes the
    listed pathname conform to a specification.  fixperm is typically used to
    configure a UNIX system upon installation. It can only be invoked by a
    super user, and it only works from the root directory. If it is invoked
    from any other directory, incorrect results will be returned.

    The specification file has the following format:  Each non-blank line
    consists of either a comment or an item specification.  A comment is any
    text from a number sign (#) up to the end of the line.  There is one item
    specification per line.  User and group ID numbers must be specified at
    the top of the specification file for each user and group mentioned in
    the file.  The syntax for the definition section is simple: the first
    field indicates the type of ID (either uid or gid), the second contains
    the name reference for the ID, and the third is the corresponding numeric
    ID.  For example:

       uid     root    0

    An item specification consists of a package specifier, a permission spec-
    ification, owner and group specifications, the number of links on the
    file, the file name, and an optional volume number.

    The package specifier is an arbitrary string which is the name of a pack-
    age within a distribution set.  A package is a set of files.

    After the package specifier is a permission specification.  The permis-
    sion specification consists of a file type, followed by a numeric permis-
    sion specification.  The file type is one of the following characters:

    a    Archive.

    b    Block device.

    c    Character device.

    d    Directory.

    e    Empty file (create if -c option given).

    f    Text file.

    p    Named pipe.

    o    OK. It indicates to fixperm that there should be no file type check-
         ing allowing any format or contents in what would normally be the
         header section of an executable file.  For example, data files and
         encrypted files should be of type ``o''.

    x    Executable.

    If the file type is used as an upper-case letter, then the file associ-
    ated with it is optional, and fixperm will not return an error message if
    it does not exist.

    The numeric permission conforms to the scheme described in chmod(C).  The
    owner and group are in the third column separated by a slash: for exam-
    ple: ``bin/bin''.  The fourth column indicates the number of links.  If
    there are links to the file, the next line contains the linked filename
    with no other information.  The fifth column is a pathname.  The pathname
    must be relative, that is, not preceded by a slash ``/''.  The sixth
    column is only used for special files, giving the major and minor device
    numbers, or volume numbers.

 Options

    The following options are available from the command line, unless other-
    wise noted:

    -a      Ensures that all files specified in the list exist on the hard
            disk.

    -c      Create empty files and missing directories.  Also creates (or
            modifies) device files.

    -d pkg  Process input lines beginning with given package specifier string
            (see above).  For instance, -dBASE processes only items specified
            as belonging to the Basic utilities set.  The default action is
            to process all lines.

    -D      List directories only on standard output.  Does not modify target
            files.

    -f      List files only on standard output. Does not modify target files.

    -g      Instructs fixperm to list devices as specified in the permlist
            (similar to the -f flag, which lists files on standard output).
            No changes are made as a result of this flag.

    -i      (Available from a program or shell script only)

            Check only if the selected packages are installed.  Return values
            are:

            0:      package completely installed
            3:      not found
            4:      package not installed
            5:      package partially installed


    -l      List files and directories on standard output.  Does not modify
            target files.

    -n      Report errors only.  Does not modify target files.

    -O      Omit link names from lists when used with the list options; -D,
            -f, -l, or -w.

    -p      Override default uid/gid found in /etc/passwd and /etc/group with
            the value found in the permlist.  Because UNIX and XENIX have
            different values for certain uid and gids (for example, in UNIX
            bin=2, and XENIX bin=3) the default value is gleaned from the
            /etc/passwd and /etc/group files.  This option forces the values
            to be taken from the perms list.  It also generates a warning if
            the perms list doesn't include /etc/passwd and /etc/group.

    -s      Modify special device files in addition to the rest of the perm-
            list.

    -S      Issues a complaint if files are not in x.out format.

    -u pkg  Like -d, but processes items that are not part of the given pack-
            age.

    -v      Verbose, in particular, issues a complaint if executable files
            are word swapped, not fixed stack, not separate ``I'' and ``D'',
            or not stripped.

    -w      Lists where (what volume) the specified files or directories are
            located.

    -X      Print only files and/or directories not installed.

    The following two lines make a distribution and invoke tar(C) to archive
    only the files in /etc/perms/inst on /dev/sample:

       /etc/fixperm -f /etc/perms/inst > list
       tar cfF /dev/sample list

    This example reports BASE package errors:

       /etc/fixperm -nd BASE /etc/perms/*

    or

       /etc/fixperm -nd BASE /etc/perms/filename


 Note

    Usually fixperm is only run by a shell script at installation.

 See also

    custom(ADM)

 Value added

    fixperm is an extension of AT&T System V provided by The Santa Cruz
    Operation, Inc.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026