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.
59 .BI "\-g, \-\-group " group
64 won't warn about a directory being group-writable if its gid matches
68 may be a group name (looked up in
70 or a numeric gid in decimal.
73 Writes on standard output a colon-separated list of the directories
76 considered `safe'. This can be used to filter out unsafe directories in
90 less verbose about what it's doing. This option, like
92 has a cumulative effect. Each
99 Modifies the ruleset slightly so that any step through the filesystem is
100 OK, even if world- or group-writable (but not owned by someone else), as
101 long as the directory's sticky bit is set. The default is that sticky
102 directories are considered safe only if they're not the final step.
103 Turning this option on isn't recommended: if you use a sticky directory
104 in your path then other people can add malicious commands whose names
105 are common typos of standard ones.
107 .B "\-t, \-\-trust-groups"
108 Modifies the ruleset slightly so that
110 doesn't warn about directories group-owned by groups you're a member
111 of. In other words, it trusts your fellow group-members
112 .IR "in their capacity as group-owners only" :
114 will still warn about directories owned by people in your groups.
116 .B "\-v, \-\-verbose"
119 more verbose about what it's doing. This option has a cumulative
120 effect, so put more in for more verbosity. Note that verbose doesn't
121 mean the same as interesting. The default is to report problems with
122 directories and system errors.
129 Mark Wooding (mdw@distorted.org.uk).