]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_unixd.xml
Update docco xforms
[apache] / docs / manual / mod / mod_unixd.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
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
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
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.
21 -->
22
23 <modulesynopsis metafile="mod_unixd.xml.meta">
24
25 <name>mod_unixd</name>
26 <description>Basic (required) security for Unix-family platforms.</description>
27 <status>Base</status>
28
29 <seealso><a href="../suexec.html">suEXEC support</a></seealso>
30
31 <directivesynopsis>
32 <name>Group</name>
33 <description>Group under which the server will answer
34 requests</description>
35 <syntax>Group <var>unix-group</var></syntax>
36 <default>Group #-1</default>
37 <contextlist><context>server config</context></contextlist>
38 <compatibility>Only valid in global server config since Apache
39 2.0</compatibility>
40
41 <usage>
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>
48
49     <dl>
50       <dt>A group name</dt>
51       <dd>Refers to the given group by name.</dd>
52
53       <dt><code>#</code> followed by a group number.</dt>
54       <dd>Refers to a group by its number.</dd>
55     </dl>
56
57     <example><title>Example</title>
58       Group www-group
59     </example>
60
61     <p>It is recommended that you set up a new group specifically for
62     running the server. Some admins use user <code>nobody</code>,
63     but this is not always possible or desirable.</p>
64
65     <note type="warning"><title>Security</title>
66       <p>Don't set <directive>Group</directive> (or <directive
67       module="mod_unixd">User</directive>) to <code>root</code> unless
68       you know exactly what you are doing, and what the dangers are.</p>
69     </note>
70
71 </usage>
72 <seealso><directive module="mod_privileges">VHostGroup</directive></seealso>
73 <seealso><directive module="mod_suexec">SuexecUserGroup</directive></seealso>
74 </directivesynopsis>
75
76 <directivesynopsis>
77 <name>User</name>
78 <description>The userid under which the server will answer
79 requests</description>
80 <syntax>User <var>unix-userid</var></syntax>
81 <default>User #-1</default>
82 <contextlist><context>server config</context></contextlist>
83 <compatibility>Only valid in global server config since Apache
84 2.0</compatibility>
85
86 <usage>
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>
95
96     <dl>
97       <dt>A username</dt>
98       <dd>Refers to the given user by name.</dd>
99
100       <dt># followed by a user number.</dt>
101       <dd>Refers to a user by its number.</dd>
102     </dl>
103
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>
112
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>
117     </note>
118
119 </usage>
120 <seealso><directive module="mod_privileges">VHostUser</directive></seealso>
121 <seealso><directive module="mod_suexec">SuexecUserGroup</directive></seealso>
122 </directivesynopsis>
123
124 <directivesynopsis>
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>
131 <compatibility>Available in Apache 2.2.10 and later</compatibility>
132
133 <usage>
134     <p>This directive tells the server to <var>chroot(8)</var> to the
135     specified directory after startup, but before accepting requests
136     over the 'net.</p>
137     <p>Note that running the server under chroot is not simple,
138     and requires additional setup, particularly if you are running
139     scripts such as CGI or PHP.  Please make sure you are properly
140     familiar with the operation of chroot before attempting to use
141     this feature.</p>
142 </usage>
143 </directivesynopsis>
144
145 <directivesynopsis>
146 <name>Suexec</name>
147 <description>Enable or disable the suEXEC feature</description>
148 <syntax>Suexec On|Off</syntax>
149 <default>On if suexec binary exists with proper owner and mode,
150 Off otherwise</default>
151 <contextlist><context>server config</context></contextlist>
152 <compatibility>Available in Apache httpd 2.3.9 and later</compatibility>
153
154 <usage>
155     <p>When On, startup will fail if the suexec binary doesn't exist
156     or has an invalid owner or file mode.</p>
157     <p>When Off, suEXEC will be disabled even if the suexec binary exists
158     and has a valid owner and file mode.</p>
159 </usage>
160 </directivesynopsis>
161
162 </modulesynopsis>