suexec.html.en revision 75ada6e55d40cc0b66f2d9a05b7f705598718b11
61932ed91732417e05c8c6fd335acf1be896c778Mark Andrews<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2dc5db0eb0ba6672fb1c23875e2a964e59c24cd1Tinderbox User<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
61932ed91732417e05c8c6fd335acf1be896c778Mark Andrews XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews This file is generated from xml source: DO NOT EDIT
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
61932ed91732417e05c8c6fd335acf1be896c778Mark Andrews<title>suEXEC Support - Apache HTTP Server</title>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<link href="/images/favicon.ico" rel="shortcut icon" /></head>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<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>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<p class="apache">Apache HTTP Server Version 2.1</p>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
8a743600ddfcd97adbbd83f8e9f546ce7d365acbEvan Hunt<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="./">Version 2.1</a></div><div id="page-content"><div id="preamble"><h1>suEXEC Support</h1>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<p><span>Available Languages: </span><a href="/en/suexec.html" title="English"> en </a> |
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<a href="/ja/suexec.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<a href="/ko/suexec.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt Apache users the ability
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt to run <strong>CGI</strong> and <strong>SSI</strong> programs
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt under user IDs different from the user ID of the calling
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt web-server. Normally, when a CGI or SSI program executes, it
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt runs as the same user who is running the web server.</p>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt <p>Used properly, this feature can reduce
eca15167ac923ec2c16add3e7e3dd6c596aa6f8cMark Andrews considerably the security risks involved with allowing users to
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt develop and run private CGI or SSI programs. However, if suEXEC
eca15167ac923ec2c16add3e7e3dd6c596aa6f8cMark Andrews is improperly configured, it can cause any number of problems
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt and possibly create new holes in your computer's security. If
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt you aren't familiar with managing <em>setuid root</em> programs
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt and the security issues they present, we highly recommend that
8a743600ddfcd97adbbd83f8e9f546ce7d365acbEvan Hunt you not consider using suEXEC.</p>
8fda09fc85d395d2dc955d23c5eb476cf4d2dffbEvan Hunt<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#before">Before we begin</a></li>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<li><img alt="" src="/images/down.gif" /> <a href="#model">suEXEC Security Model</a></li>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<li><img alt="" src="/images/down.gif" /> <a href="#install">Configuring & Installing
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<li><img alt="" src="/images/down.gif" /> <a href="#enable">Enabling & Disabling
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<li><img alt="" src="/images/down.gif" /> <a href="#usage">Using suEXEC</a></li>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<li><img alt="" src="/images/down.gif" /> <a href="#debug">Debugging suEXEC</a></li>
8a743600ddfcd97adbbd83f8e9f546ce7d365acbEvan Hunt<li><img alt="" src="/images/down.gif" /> <a href="#jabberwock">Beware the Jabberwock:
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
eca15167ac923ec2c16add3e7e3dd6c596aa6f8cMark Andrews<h2><a name="before" id="before">Before we begin</a></h2>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt <p>Before jumping head-first into this document,
8a743600ddfcd97adbbd83f8e9f546ce7d365acbEvan Hunt you should be aware of the assumptions made on the part of the
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt Apache Group and this document.</p>
eca15167ac923ec2c16add3e7e3dd6c596aa6f8cMark Andrews <p>First, it is assumed that you are using a UNIX
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt derivative operating system that is capable of
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt <strong>setuid</strong> and <strong>setgid</strong> operations.
3916872f379457fe344afb02398a009701c5016aEvan Hunt All command examples are given in this regard. Other platforms,
eca15167ac923ec2c16add3e7e3dd6c596aa6f8cMark Andrews if they are capable of supporting suEXEC, may differ in their
1c95f672323b7ac176af4225a36d33daa442542cMark Andrews configuration.</p>
3916872f379457fe344afb02398a009701c5016aEvan Hunt <p>Second, it is assumed you are familiar with
eca15167ac923ec2c16add3e7e3dd6c596aa6f8cMark Andrews some basic concepts of your computer's security and its
3916872f379457fe344afb02398a009701c5016aEvan Hunt administration. This involves an understanding of
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt <strong>setuid/setgid</strong> operations and the various
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt effects they may have on your system and its level of
d58e33bfabfee19a035031dac633d36659738d56Evan Hunt security.</p>
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt <p>Third, it is assumed that you are using an
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt <strong>unmodified</strong> version of suEXEC code. All code
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt for suEXEC has been carefully scrutinized and tested by the
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt developers as well as numerous beta testers. Every precaution
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt has been taken to ensure a simple yet solidly safe base of
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt code. Altering this code can cause unexpected problems and new
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt security risks. It is <strong>highly</strong> recommended you
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt not alter the suEXEC code unless you are well versed in the
0994d3a21baeedf28cbf7e461b3bd8de5f9a6654Evan Hunt particulars of security programming and are willing to share
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień your work with the Apache Group for consideration.</p>
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień <p>Fourth, and last, it has been the decision of
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień the Apache Group to <strong>NOT</strong> make suEXEC part of
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień the default installation of Apache. To this end, suEXEC
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień configuration requires of the administrator careful attention
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień to details. After due consideration has been given to the
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień various settings for suEXEC, the administrator may install
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień suEXEC through normal installation methods. The values for
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień these settings need to be carefully determined and specified by
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień the administrator to properly maintain system security during
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień the use of suEXEC functionality. It is through this detailed
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień process that the Apache Group hopes to limit suEXEC
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień installation only to those who are careful and determined
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień enough to use it.</p>
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień <p>Still with us? Yes? Good. Let's move on!</p>
71bd858d8ed62672e7c23999dc7c02fd16a55089Evan Hunt</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8a743600ddfcd97adbbd83f8e9f546ce7d365acbEvan Hunt<h2><a name="model" id="model">suEXEC Security Model</a></h2>
3635d8f9104e70e141a8f191a0e6c1502ceed2f3Mark Andrews <p>Before we begin configuring and installing
3635d8f9104e70e141a8f191a0e6c1502ceed2f3Mark Andrews suEXEC, we will first discuss the security model you are about
with a proper suEXEC setup, see the <a href="#jabberwock">"Beware the Jabberwock"</a> section of this
wrapper is through the <code class="directive"><a href="/mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code> directive in
<em>User</em> and <em>Group</em> defined for that <code class="directive"><a href="/mod/core.html#virtualhost"><VirtualHost></a></code>. If this
directive is not specified for a <code class="directive"><a href="/mod/core.html#virtualhost"><VirtualHost></a></code> then the main server userid
<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>