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
33 No step should be a directory owned by another user (other than root).
35 No step should be a symbolic link inside a sticky directory and owned by
38 The author is not aware of any weaknesses in this ruleset. The
39 objective is that nobody other than the user and the superuser should be
40 able to add or change the set of files available within the directories
43 The following command line options are available:
46 Displays a relatively verbose message describing how to use
55 Displays a very terse usage summary.
60 more verbose about what it's doing. This option has a cumulative
61 effect, so put more in for more verbosity. Note that verbose doesn't
62 mean the same as interesting. The default is to report problems with
63 directories and system errors.
65 .B "\-g, \-\-group " group
70 won't warn about a directory being group-writable if its gid matches
74 may be a group name (looked up in
76 or a numeric gid in decimal.
81 less verbose about what it's doing. This option, like
83 has a cumulative effect. Each
90 Modifies the ruleset slightly so that any step through the filesystem is
91 OK, even if world- or group-writable (but not owned by someone else), as
92 long as the directory's sticky bit is set. The default is that sticky
93 directories are considered safe only if they're not the final step.
94 Turning this option on isn't recommended: if you use a sticky directory
95 in your path then other people can add malicious commands whose names
96 are common typos of standard ones.
98 .B "\-t, \-\-trust\-group"
99 Modifies the ruleset slightly so that
101 doesn't warn about directories group-owned by groups you're a member
102 of. In other words, it trusts your fellow group-members
103 .IR "in their capacity as group-owners only" :
105 will still warn about directories owned by people in your groups.
108 Writes on standard output a colon-separated list of the directories
111 considered `safe'. This can be used to filter out unsafe directories in
127 Mark Wooding (mdw@distorted.org.uk).