2 .TH chkpath 1 "6 April 1999" "Local tools"
4 chkpath \- check a path string for security
14 command checks one or more path strings (i.e., lists of directories
15 separated by colons) for security. If no path strings are given, the
18 environment variable is examined.
20 Each directory in turn is broken into its constituent parts and every
21 step which must be made through the filesystem to reach that directory
22 from the root is scrutinized for vulnerabilities. The checks made
23 against each directory and symbolic link along the way are as follows:
25 No step should be a directory which is world-writable unless its sticky
26 bit is set, and it's not the final step.
28 No step should be a directory which is group-writable unless its sticky
29 bit is set, and it's not the final step. (However, see the
35 No step should be a directory owned by another user (other than root).
37 No step should be a symbolic link inside a sticky directory and owned by
40 The author is not aware of any weaknesses in this ruleset. The
41 objective is that nobody other than the user and the superuser should be
42 able to add or change the set of files available within the directories
45 The following command line options are available:
48 Displays a relatively verbose message describing how to use
57 Displays a very terse usage summary.
62 more verbose about what it's doing. This option has a cumulative
63 effect, so put more in for more verbosity. Note that verbose doesn't
64 mean the same as interesting. The default is to report problems with
65 directories and system errors.
67 .BI "\-g, \-\-group " group
72 won't warn about a directory being group-writable if its gid matches
76 may be a group name (looked up in
78 or a numeric gid in decimal.
83 less verbose about what it's doing. This option, like
85 has a cumulative effect. Each
92 Modifies the ruleset slightly so that any step through the filesystem is
93 OK, even if world- or group-writable (but not owned by someone else), as
94 long as the directory's sticky bit is set. The default is that sticky
95 directories are considered safe only if they're not the final step.
96 Turning this option on isn't recommended: if you use a sticky directory
97 in your path then other people can add malicious commands whose names
98 are common typos of standard ones.
100 .B "\-t, \-\-trust-group"
101 Modifies the ruleset slightly so that
103 doesn't warn about directories group-owned by groups you're a member
104 of. In other words, it trusts your fellow group-members
105 .IR "in their capacity as group-owners only" :
107 will still warn about directories owned by people in your groups.
110 Writes on standard output a colon-separated list of the directories
113 considered `safe'. This can be used to filter out unsafe directories in
129 Mark Wooding (mdw@distorted.org.uk).