mod_unixd.html.en revision 4eea6eaa18317f1122158d21b4437d90e04e56d2
842ae4bd224140319ae7feec1872b93dfd491143fielding<?xml version="1.0" encoding="ISO-8859-1"?>
842ae4bd224140319ae7feec1872b93dfd491143fielding<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
842ae4bd224140319ae7feec1872b93dfd491143fielding<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
842ae4bd224140319ae7feec1872b93dfd491143fielding XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
842ae4bd224140319ae7feec1872b93dfd491143fielding This file is generated from xml source: DO NOT EDIT
842ae4bd224140319ae7feec1872b93dfd491143fielding XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
b0fb330a8581c8bfab5e523084f9f39264a52b12gstein -->
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd<title>mod_unixd - Apache HTTP Server</title>
b0fb330a8581c8bfab5e523084f9f39264a52b12gstein<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd<body>
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd<div id="page-header">
b0fb330a8581c8bfab5e523084f9f39264a52b12gstein<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<p class="apache">Apache HTTP Server Version 2.3</p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<img alt="" src="/images/feather.gif" /></div>
b0fb330a8581c8bfab5e523084f9f39264a52b12gstein<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div id="path">
f4c310fd2555c6faca1f980f00b161eadb089023gstein<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div id="page-content">
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div id="preamble"><h1>Apache Module mod_unixd</h1>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div class="toplang">
50ebafad0f7b02e3808b4afdc967a64b565f5723gstein<p><span>Available Languages: </span><a href="/en/mod/mod_unixd.html" title="English">&nbsp;en&nbsp;</a> |
f4c310fd2555c6faca1f980f00b161eadb089023gstein<a href="/tr/mod/mod_unixd.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein</div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Basic (required) security for Unix-family platforms.</td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr></table>
f4c310fd2555c6faca1f980f00b161eadb089023gstein</div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div id="quickview"><h3 class="directives">Directives</h3>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<ul id="toc">
8a46775d163c06a8c51d1b0a3f2edfde945cb1d8stoddard<li><img alt="" src="/images/down.gif" /> <a href="#chrootdir">ChrootDir</a></li>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein<li><img alt="" src="/images/down.gif" /> <a href="#group">Group</a></li>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein<li><img alt="" src="/images/down.gif" /> <a href="#suexec">Suexec</a></li>
2acd42d5591f6db91fc3716300ecce1818e6fc14gstein<li><img alt="" src="/images/down.gif" /> <a href="#user">User</a></li>
1f6e6566a4ce31a0b95d5400c36d0aaff7a6e94agstein</ul>
0f71b39d5ec15a1f561ff0bf542439e2e2d435b8gregames<h3>See also</h3>
0f71b39d5ec15a1f561ff0bf542439e2e2d435b8gregames<ul class="seealso">
0f71b39d5ec15a1f561ff0bf542439e2e2d435b8gregames<li><a href="/suexec.html">suEXEC support</a></li>
1a9d922232824a7cc008d4f74e48bd82adf5bdedgstein</ul></div>
f5ec9b038bb9db933072ba2c0a8e7bb2a3cedbdagstein
a9a941ed6ca86039137d64bdc7b1c4fda9d07d12sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a9a941ed6ca86039137d64bdc7b1c4fda9d07d12sf<div class="directive-section"><h2><a name="ChrootDir" id="ChrootDir">ChrootDir</a> <a name="chrootdir" id="chrootdir">Directive</a></h2>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<table class="directive">
6138d79b6ade895971022ea7be76a9fcf0e5ea8csf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory for apache to run chroot(8) after startup.</td></tr>
7a4999217dfa98039f66724f390511e3a4e4ae8cgstein<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ChrootDir <var>/path/to/directory</var></code></td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
2acd42d5591f6db91fc3716300ecce1818e6fc14gstein<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mod_unixd.html">mod_unixd</a></code></td></tr>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein</table>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein <p>This directive, available in httpd 2.2.9(?) and later, tells the
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe server to <var>chroot(8)</var> to the specified directory after
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein startup, but before accepting requests over the 'net.</p>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe <p>Note that running the server under chroot is not simple,
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe and requires additional setup, particularly if you are running
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe scripts such as CGI or PHP. Please make sure you are properly
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein familiar with the operation of chroot before attempting to use
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein this feature.</p>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein</div>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div class="directive-section"><h2><a name="Group" id="Group">Group</a> <a name="group" id="group">Directive</a></h2>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<table class="directive">
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Group under which the server will answer
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgsteinrequests</td></tr>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Group <var>unix-group</var></code></td></tr>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Group #-1</code></td></tr>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
10d15a1817ddd19094a70ed0f7e4efc6a56f449fgstein<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_unixd</td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only valid in global server config since Apache
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm2.0</td></tr>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe</table>
f4c310fd2555c6faca1f980f00b161eadb089023gstein <p>The <code class="directive">Group</code> directive sets the group under
f4c310fd2555c6faca1f980f00b161eadb089023gstein which the server will answer requests. In order to use this
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe directive, the server must be run initially as <code>root</code>. If
f4c310fd2555c6faca1f980f00b161eadb089023gstein you start the server as a non-root user, it will fail to change to the
79c0832f728a14c4541e240817dce2e4a1315fe4gstein specified group, and will instead continue to run as the group of the
f4c310fd2555c6faca1f980f00b161eadb089023gstein original user. <var>Unix-group</var> is one of:</p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein
819a04ebb09c8cd3ed269218137b7ea025671d79gstein <dl>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein <dt>A group name</dt>
f4c310fd2555c6faca1f980f00b161eadb089023gstein <dd>Refers to the given group by name.</dd>
f4c310fd2555c6faca1f980f00b161eadb089023gstein
f4c310fd2555c6faca1f980f00b161eadb089023gstein <dt><code>#</code> followed by a group number.</dt>
f4c310fd2555c6faca1f980f00b161eadb089023gstein <dd>Refers to a group by its number.</dd>
e3942933dd46798c34cf586dea8a83d25de2672fgstein </dl>
f4c310fd2555c6faca1f980f00b161eadb089023gstein
819a04ebb09c8cd3ed269218137b7ea025671d79gstein <div class="example"><h3>Example</h3><p><code>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein Group www-group
819a04ebb09c8cd3ed269218137b7ea025671d79gstein </code></p></div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein
f4c310fd2555c6faca1f980f00b161eadb089023gstein <p>It is recommended that you set up a new group specifically for
f4c310fd2555c6faca1f980f00b161eadb089023gstein running the server. Some admins use user <code>nobody</code>,
819a04ebb09c8cd3ed269218137b7ea025671d79gstein but this is not always possible or desirable.</p>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein
819a04ebb09c8cd3ed269218137b7ea025671d79gstein <div class="warning"><h3>Security</h3>
31dff87ac99a1efdb8562d79389b767a4a2afbe3sf <p>Don't set <code class="directive">Group</code> (or <code class="directive"><a href="#user">User</a></code>) to <code>root</code> unless
185aa71728867671e105178b4c66fbc22b65ae26sf you know exactly what you are doing, and what the dangers are.</p>
31dff87ac99a1efdb8562d79389b767a4a2afbe3sf </div>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein
819a04ebb09c8cd3ed269218137b7ea025671d79gstein
e3942933dd46798c34cf586dea8a83d25de2672fgstein<h3>See also</h3>
e3942933dd46798c34cf586dea8a83d25de2672fgstein<ul>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein<li><code class="directive"><a href="/mod/mod_privileges.html#vhostgroup">VHostGroup</a></code></li>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<li><code class="directive"><a href="/mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code></li>
99d46a23c6eac800f327b29f8009f7d7da986230trawick</ul>
f4c310fd2555c6faca1f980f00b161eadb089023gstein</div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div class="directive-section"><h2><a name="Suexec" id="Suexec">Suexec</a> <a name="suexec" id="suexec">Directive</a></h2>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<table class="directive">
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable or disable the suEXEC feature</td></tr>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Suexec On|Off</code></td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>On if suexec binary exists with proper owner and mode,
1ccd992d37d62c8cb2056126f2234f64ec189bfddougmOff otherwise</code></td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_unixd</td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.3.9 and later</td></tr>
066877f1a045103acfdd376d48cdd473c33f409bdougm</table>
f4c310fd2555c6faca1f980f00b161eadb089023gstein <p>When On, startup will fail if the suexec binary doesn't exist
f4c310fd2555c6faca1f980f00b161eadb089023gstein or has an invalid owner or file mode.</p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein <p>When Off, suEXEC will be disabled even if the suexec binary exists
f4c310fd2555c6faca1f980f00b161eadb089023gstein and has a valid owner and file mode.</p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm</div>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div class="directive-section"><h2><a name="User" id="User">User</a> <a name="user" id="user">Directive</a></h2>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein<table class="directive">
dd1db5e838ed2c9b64a991007d4e385532376db1sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The userid under which the server will answer
f4c310fd2555c6faca1f980f00b161eadb089023gsteinrequests</td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>User <var>unix-userid</var></code></td></tr>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>User #-1</code></td></tr>
542880af4dc8f26fd8bfc88a1888f92ef98fba3bwrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
e8f95a682820a599fe41b22977010636be5c2717jim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
58bcfc43cfb8ad45551c8c1fc2b71a3fdac384d9wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_unixd</td></tr>
542880af4dc8f26fd8bfc88a1888f92ef98fba3bwrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only valid in global server config since Apache
819a04ebb09c8cd3ed269218137b7ea025671d79gstein2.0</td></tr>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein</table>
819a04ebb09c8cd3ed269218137b7ea025671d79gstein <p>The <code class="directive">User</code> directive sets the user ID as
e8f95a682820a599fe41b22977010636be5c2717jim which the server will answer requests. In order to use this
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe directive, the server must be run initially as <code>root</code>.
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe If you start the server as a non-root user, it will fail to change
f4c310fd2555c6faca1f980f00b161eadb089023gstein to the lesser privileged user, and will instead continue to run as
f4c310fd2555c6faca1f980f00b161eadb089023gstein that original user. If you do start the server as <code>root</code>,
f4c310fd2555c6faca1f980f00b161eadb089023gstein then it is normal for the parent process to remain running as root.
f4c310fd2555c6faca1f980f00b161eadb089023gstein <var>Unix-userid</var> is one of:</p>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe <dl>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe <dt>A username</dt>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe <dd>Refers to the given user by name.</dd>
f4c310fd2555c6faca1f980f00b161eadb089023gstein
f4c310fd2555c6faca1f980f00b161eadb089023gstein <dt># followed by a user number.</dt>
f4c310fd2555c6faca1f980f00b161eadb089023gstein <dd>Refers to a user by its number.</dd>
f4c310fd2555c6faca1f980f00b161eadb089023gstein </dl>
f4c310fd2555c6faca1f980f00b161eadb089023gstein
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm <p>The user should have no privileges that result in it being
f5ec9b038bb9db933072ba2c0a8e7bb2a3cedbdagstein able to access files that are not intended to be visible to the
f4c310fd2555c6faca1f980f00b161eadb089023gstein outside world, and similarly, the user should not be able to
f4c310fd2555c6faca1f980f00b161eadb089023gstein execute code that is not meant for HTTP requests. It is
f4c310fd2555c6faca1f980f00b161eadb089023gstein recommended that you set up a new user and group specifically for
f4c310fd2555c6faca1f980f00b161eadb089023gstein running the server. Some admins use user <code>nobody</code>, but
f4c310fd2555c6faca1f980f00b161eadb089023gstein this is not always desirable, since the <code>nobody</code> user
f4c310fd2555c6faca1f980f00b161eadb089023gstein can have other uses on the system.</p>
cc8241a7ee9815575a267e13eff62b6fddf1fe58gstein
cc8241a7ee9815575a267e13eff62b6fddf1fe58gstein <div class="warning"><h3>Security</h3>
f4c310fd2555c6faca1f980f00b161eadb089023gstein <p>Don't set <code class="directive">User</code> (or <code class="directive"><a href="#group">Group</a></code>) to <code>root</code> unless
f4c310fd2555c6faca1f980f00b161eadb089023gstein you know exactly what you are doing, and what the dangers are.</p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein </div>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe
f4c310fd2555c6faca1f980f00b161eadb089023gstein
f4c310fd2555c6faca1f980f00b161eadb089023gstein<h3>See also</h3>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<ul>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe<li><code class="directive"><a href="/mod/mod_privileges.html#vhostuser">VHostUser</a></code></li>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe<li><code class="directive"><a href="/mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code></li>
6f15570e3adc0faf87bf55f70857028276fc9e32wrowe</ul>
f4c310fd2555c6faca1f980f00b161eadb089023gstein</div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein</div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<div class="bottomlang">
f4c310fd2555c6faca1f980f00b161eadb089023gstein<p><span>Available Languages: </span><a href="/en/mod/mod_unixd.html" title="English">&nbsp;en&nbsp;</a> |
f4c310fd2555c6faca1f980f00b161eadb089023gstein<a href="/tr/mod/mod_unixd.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein</div><div id="footer">
f4c310fd2555c6faca1f980f00b161eadb089023gstein<p class="apache">Copyright 2010 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>
f4c310fd2555c6faca1f980f00b161eadb089023gstein</body></html>