• Keine Ergebnisse gefunden

fixmog, cps

Im Dokument System Administrator's Reference (Seite 140-146)

make all system files consistent with the authentication database, make specific system files consistent with the authentication database

Syntax

/tcb/binlfixmog [ -i ] [ -v ]

/tcblbinlcps [ 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 pri-marily 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 .. /fi'e). 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.

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.

fixmog(ADM)

File

/etc/auth/system/files File Control database

See also

integrity(ADM), fixmog(ADM), tcbck(ADM)

Diagnostics

Notes

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(ADM) com-mand 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.

cps converts the pathnames supplied to canonical pathnames, i.e. 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.

Value added

fixmog and cps are an extension of AT&T System V provided by The Santa Cruz Operation, Inc.

fixperm(ADM)

fixperm

correct or initialize file permissions and ownership

Syntax

letdfixperm [ -acCDfgilLnOpsSUvwX] [ -d pkg] [ -u pkg ] specfile

Description

For each line in the specification file specfile, fixperm makes the listed path-name 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 specifica-tion file for each user and group menspecifica-tioned 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 specifica-tion, 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 package within a distribution set. A package is a set of files.

After the package specifier is a permission specification. The permission spe-cification consists of a file type, followed by a numeric permission specifica-tion. 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.

fixperm(ADM)

Options

p Named pipe.

o OK. It indicates to fixperm that there should be no file type checking 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 lid'.

x Executable.

C Compress file. This is optional and can be used in addition to the previ-ous file types described above. When used with the -C option, it enables the file to be compressed.

U Uncompress file. This is also optional and enables the file to be

uncompressed when used with the -U option. .

If the file type is used as an upper-case letter, then the file associated 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 example:

''hin/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 informa-tion. 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.

The following options are available from the command line, unless otherwise 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 modi-fies) device files.

-C Compress all types of files with the additional

"c"

permission specif-ication.

-d pkg Process input lines beginning with given pa~kage 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

fixperm(ADM) -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

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

-L List files on standard output but any compressed files (that is, C file types) are printed with a ".Z" suffix.

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

-0 Omit link names from lists when used with the list options; -D, -f, -1, -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 permlist.

-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 package.

-U . Uncompress all types of files with the additional"C" permission spe-cification.

-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.

fixperm(ADM)

Note

See also

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 /ete/perms/

or

/ete/fixperm -nd BASE fete/perms/filename

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

custom(ADM)

Value added

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

fsave(ADM)

fsave

interactive, error-checking filesystem backup

Syntax

fsave filesystem [ backupinfo ] [ media info ] [ sitename ]

Description

fsave is used by fsphoto(ADM) to provide a semi-automated interface to xbackup(ADM) and cpio(C) for backing up filesystems. Operator intervention is required to mount and dismount tapes or floppies at the appropriate times, but is kept to a minimum to reduce the potential for error.

The operator is prompted each time some action is required, such as mount-ing or unmountmount-ing a tape or floppy. These prompts, and their possible selec-tions, are described below.

For all prompts, an answer of h, H, or? will display a short summary of the possible answers.

Im Dokument System Administrator's Reference (Seite 140-146)