DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

fixmog(ADM)


fixmog, cps -- make all or specific system files consistent with the authentication database

Syntax

/etc/fixmog [ -i ] [ -v ]

/tcb/bin/cps [ absolute_pathnames ]

Description

fixmog attempts to correct inconsistencies found by integrity(ADM). integrity traverses the File Control database and compares each entry to the real file in the filesystem. Each file is checked to ensure it has the specified owner, group, access permissions and type. fixmog changes the owner, group and access permissions of files to those in the File Control database. If the -i (interactive) option is used, fixmog requests confirmation before making any changes. If the -v (verbose) option is in effect, fixmog displays a line detailing each change made. The -i option overrides the -v option. If a file is of the wrong type (for example, a regular file when it should be a directory), a message giving the expected and actual types is output and no changes are made to that file. If a change fails, an error message giving the change attempted is output.

Like fixmog, cps is used to correct problems in the TCB. However, cps checks specified files rather than all files in the File Control database. cps is used primarily by the crash recovery script to ensure files critical to the TCB exist and have the correct owner, group and access permissions specified in the File Control database.

cps accepts absolute pathnames of directories and files to be created. Absolute pathnames are complete pathnames (for example /tcb/bin/cps) as opposed to relative pathnames (for example ../file). An entry (containing a mode) for each component of each pathname must be present in the File Control database, otherwise a fatal error is returned.

cps converts the pathnames supplied to canonical pathnames, that is. ones that don't contain consecutive ``/''s, and none of the directories are ``.'' or ``..''. This enables pathnames to be looked up in the File Control database where pathnames should also be in this format.

Each missing element of each path is created as specified in the File Control database. Elements of each path that already exist, but have incorrect owner, group or access permissions, are changed so they agree with their File Control database entries.

If no parameters are supplied, the pathnames are read from the standard input, which should contain absolute pathnames separated by newlines.

Only the super user can use the fixmog and cps commands.

Exit values

fixmog returns an exit status of 1 if the user attempting to run the program is not the superuser, invalid options were specified or the integrity command could not be run: otherwise 0 is returned. Errors cause appropriate error messages to be displayed.

cps returns an exit status of 1 if a fatal error was detected; otherwise 0 is returned if no changes were required and 2 if any changes to the file system were made. Errors cause appropriate error messages to be displayed.

Files

/etc/auth/system/files File Control database

See also

integrity(ADM), fixperm(ADM), tcbck(ADM)

Standards conformance

fixmog and cps are not part of any currently supported standard; they are extensions of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003