checkperms(1)

NAME
checkperms - check and correct file permissions

SYNOPSIS
find * -print | checkperms [-cfnq]

DESCRIPTION
The checkperms command reads a list of files from stdin and checks for each line whether the file permissions of that file are reasonable or not.

  Options

-c  Check the contents of executable files to have a known format. For example, Perl modules don't need to be executable at all. Currently, ELF and #! are recognized.

-e  Treat any warnings as errors, that is, exit with a non-zero exit status.

-f  When given once, errors are fixed automatically. When given twice, most of the warnings are fixed, too.

-n  When given once, shows what would be fixed for -f. When given twice, shows what would be fixed for -ff.

-q  When this option is given, the summary line about the number of errors and warnings is not printed as the last line.

EXIT STATUS
Zero when no errors occured, non-zero otherwise. Warnings don't affect the exit status, unless the -e option is given.

ENVIRONMENT
Nothing.

FILES
None.

EXAMPLES

SEE ALSO
find(1)

STANDARDS
None.

HISTORY
checkperms was born in 2006.

AUTHORS
Roland Illig <roland.illig@gmx.de>

CAVEATS
None.

BUGS
None known.

SECURITY CONSIDERATIONS

•   There may be race conditions between reading the file permissions and writing the fixed ones.

•   When directories are moved during a run of this program, permissions may be changed on foreign files. However, this requires good timing from the side of the attacker.