2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_unixd.xml.meta">
25 <name>mod_unixd</name>
26 <description>Basic (required) security for Unix-family platforms.</description>
28 <sourcefile>mod_unixd.c</sourcefile>
29 <identifier>unixd_module</identifier>
31 <seealso><a href="../suexec.html">suEXEC support</a></seealso>
35 <description>Group under which the server will answer
36 requests</description>
37 <syntax>Group <var>unix-group</var></syntax>
38 <default>Group #-1</default>
39 <contextlist><context>server config</context></contextlist>
42 <p>The <directive>Group</directive> directive sets the group under
43 which the server will answer requests. In order to use this
44 directive, the server must be run initially as <code>root</code>. If
45 you start the server as a non-root user, it will fail to change to the
46 specified group, and will instead continue to run as the group of the
47 original user. <var>Unix-group</var> is one of:</p>
51 <dd>Refers to the given group by name.</dd>
53 <dt><code>#</code> followed by a group number.</dt>
54 <dd>Refers to a group by its number.</dd>
57 <example><title>Example</title>
58 <highlight language="config">
63 <p>It is recommended that you set up a new group specifically for
64 running the server. Some admins use user <code>nobody</code>,
65 but this is not always possible or desirable.</p>
67 <note type="warning"><title>Security</title>
68 <p>Don't set <directive>Group</directive> (or <directive
69 module="mod_unixd">User</directive>) to <code>root</code> unless
70 you know exactly what you are doing, and what the dangers are.</p>
74 <seealso><directive module="mod_privileges">VHostGroup</directive></seealso>
75 <seealso><directive module="mod_suexec">SuexecUserGroup</directive></seealso>
80 <description>The userid under which the server will answer
81 requests</description>
82 <syntax>User <var>unix-userid</var></syntax>
83 <default>User #-1</default>
84 <contextlist><context>server config</context></contextlist>
87 <p>The <directive>User</directive> directive sets the user ID as
88 which the server will answer requests. In order to use this
89 directive, the server must be run initially as <code>root</code>.
90 If you start the server as a non-root user, it will fail to change
91 to the lesser privileged user, and will instead continue to run as
92 that original user. If you do start the server as <code>root</code>,
93 then it is normal for the parent process to remain running as root.
94 <var>Unix-userid</var> is one of:</p>
98 <dd>Refers to the given user by name.</dd>
100 <dt># followed by a user number.</dt>
101 <dd>Refers to a user by its number.</dd>
104 <p>The user should have no privileges that result in it being
105 able to access files that are not intended to be visible to the
106 outside world, and similarly, the user should not be able to
107 execute code that is not meant for HTTP requests. It is
108 recommended that you set up a new user and group specifically for
109 running the server. Some admins use user <code>nobody</code>, but
110 this is not always desirable, since the <code>nobody</code> user
111 can have other uses on the system.</p>
113 <note type="warning"><title>Security</title>
114 <p>Don't set <directive>User</directive> (or <directive
115 module="mod_unixd">Group</directive>) to <code>root</code> unless
116 you know exactly what you are doing, and what the dangers are.</p>
120 <seealso><directive module="mod_privileges">VHostUser</directive></seealso>
121 <seealso><directive module="mod_suexec">SuexecUserGroup</directive></seealso>
125 <name>ChrootDir</name>
126 <description>Directory for apache to run chroot(8) after startup.</description>
127 <syntax>ChrootDir <var>/path/to/directory</var></syntax>
128 <default>none</default>
129 <contextlist><context>server config</context></contextlist>
130 <modulelist><module>mod_unixd</module></modulelist>
133 <p>This directive tells the server to <var>chroot(8)</var> to the
134 specified directory after startup, but before accepting requests
136 <p>Note that running the server under chroot is not simple,
137 and requires additional setup, particularly if you are running
138 scripts such as CGI or PHP. Please make sure you are properly
139 familiar with the operation of chroot before attempting to use
146 <description>Enable or disable the suEXEC feature</description>
147 <syntax>Suexec On|Off</syntax>
148 <default>On if suexec binary exists with proper owner and mode,
149 Off otherwise</default>
150 <contextlist><context>server config</context></contextlist>
153 <p>When On, startup will fail if the suexec binary doesn't exist
154 or has an invalid owner or file mode.</p>
155 <p>When Off, suEXEC will be disabled even if the suexec binary exists
156 and has a valid owner and file mode.</p>