home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 May / Gamestar_62_2004-05_dvd.iso / Programy / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252162_suexec.html.en < prev    next >
Extensible Markup Language  |  2003-10-12  |  27KB  |  622 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>suEXEC Support - Apache HTTP Server</title>
  9. <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="./images/favicon.ico" rel="shortcut icon" /></head>
  13. <body id="manual-page"><div id="page-header">
  14. <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>
  15. <p class="apache">Apache HTTP Server Version 2.0</p>
  16. <img alt="" src="./images/feather.gif" /></div>
  17. <div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div>
  18. <div id="path">
  19. <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.0</a></div><div id="page-content"><div id="preamble"><h1>suEXEC Support</h1>
  20. <div class="toplang">
  21. <p><span>Available Languages: </span><a href="./en/suexec.html" title="English"> en </a> |
  22. <a href="./ja/suexec.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
  23. <a href="./ko/suexec.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
  24. </div>
  25.  
  26.     <p>The <strong>suEXEC</strong> feature provides
  27.     Apache users the ability
  28.     to run <strong>CGI</strong> and <strong>SSI</strong> programs
  29.     under user IDs different from the user ID of the calling
  30.     web-server. Normally, when a CGI or SSI program executes, it
  31.     runs as the same user who is running the web server.</p>
  32.  
  33.     <p>Used properly, this feature can reduce
  34.     considerably the security risks involved with allowing users to
  35.     develop and run private CGI or SSI programs. However, if suEXEC
  36.     is improperly configured, it can cause any number of problems
  37.     and possibly create new holes in your computer's security. If
  38.     you aren't familiar with managing <em>setuid root</em> programs
  39.     and the security issues they present, we highly recommend that
  40.     you not consider using suEXEC.</p>
  41.   </div>
  42. <div id="quickview"><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#before">Before we begin</a></li>
  43. <li><img alt="" src="./images/down.gif" /> <a href="#model">suEXEC Security Model</a></li>
  44. <li><img alt="" src="./images/down.gif" /> <a href="#install">Configuring & Installing
  45.     suEXEC</a></li>
  46. <li><img alt="" src="./images/down.gif" /> <a href="#enable">Enabling & Disabling
  47.     suEXEC</a></li>
  48. <li><img alt="" src="./images/down.gif" /> <a href="#usage">Using suEXEC</a></li>
  49. <li><img alt="" src="./images/down.gif" /> <a href="#debug">Debugging suEXEC</a></li>
  50. <li><img alt="" src="./images/down.gif" /> <a href="#jabberwock">Beware the Jabberwock:
  51.     Warnings & Examples</a></li>
  52. </ul></div>
  53. <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  54. <div class="section">
  55. <h2><a name="before" id="before">Before we begin</a></h2>
  56.  
  57.     <p>Before jumping head-first into this document,
  58.     you should be aware of the assumptions made on the part of the
  59.     Apache Group and this document.</p>
  60.  
  61.     <p>First, it is assumed that you are using a UNIX
  62.     derivative operating system that is capable of
  63.     <strong>setuid</strong> and <strong>setgid</strong> operations.
  64.     All command examples are given in this regard. Other platforms,
  65.     if they are capable of supporting suEXEC, may differ in their
  66.     configuration.</p>
  67.  
  68.     <p>Second, it is assumed you are familiar with
  69.     some basic concepts of your computer's security and its
  70.     administration. This involves an understanding of
  71.     <strong>setuid/setgid</strong> operations and the various
  72.     effects they may have on your system and its level of
  73.     security.</p>
  74.  
  75.     <p>Third, it is assumed that you are using an
  76.     <strong>unmodified</strong> version of suEXEC code. All code
  77.     for suEXEC has been carefully scrutinized and tested by the
  78.     developers as well as numerous beta testers. Every precaution
  79.     has been taken to ensure a simple yet solidly safe base of
  80.     code. Altering this code can cause unexpected problems and new
  81.     security risks. It is <strong>highly</strong> recommended you
  82.     not alter the suEXEC code unless you are well versed in the
  83.     particulars of security programming and are willing to share
  84.     your work with the Apache Group for consideration.</p>
  85.  
  86.     <p>Fourth, and last, it has been the decision of
  87.     the Apache Group to <strong>NOT</strong> make suEXEC part of
  88.     the default installation of Apache. To this end, suEXEC
  89.     configuration requires of the administrator careful attention
  90.     to details. After due consideration has been given to the
  91.     various settings for suEXEC, the administrator may install
  92.     suEXEC through normal installation methods. The values for
  93.     these settings need to be carefully determined and specified by
  94.     the administrator to properly maintain system security during
  95.     the use of suEXEC functionality. It is through this detailed
  96.     process that the Apache Group hopes to limit suEXEC
  97.     installation only to those who are careful and determined
  98.     enough to use it.</p>
  99.  
  100.     <p>Still with us? Yes? Good. Let's move on!</p>
  101. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  102. <div class="section">
  103. <h2><a name="model" id="model">suEXEC Security Model</a></h2>
  104.  
  105.     <p>Before we begin configuring and installing
  106.     suEXEC, we will first discuss the security model you are about
  107.     to implement. By doing so, you may better understand what
  108.     exactly is going on inside suEXEC and what precautions are
  109.     taken to ensure your system's security.</p>
  110.  
  111.     <p><strong>suEXEC</strong> is based on a setuid
  112.     "wrapper" program that is called by the main Apache web server.
  113.     This wrapper is called when an HTTP request is made for a CGI
  114.     or SSI program that the administrator has designated to run as
  115.     a userid other than that of the main server. When such a
  116.     request is made, Apache provides the suEXEC wrapper with the
  117.     program's name and the user and group IDs under which the
  118.     program is to execute.</p>
  119.  
  120.     <p>The wrapper then employs the following process
  121.     to determine success or failure -- if any one of these
  122.     conditions fail, the program logs the failure and exits with an
  123.     error, otherwise it will continue:</p>
  124.  
  125.     <ol>
  126.       <li>
  127.         <strong>Is the user executing this wrapper a valid user of
  128.         this system?</strong> 
  129.  
  130.         <p class="indent">
  131.           This is to ensure that the user executing the wrapper is
  132.           truly a user of the system.
  133.         </p>
  134.      </li>
  135.  
  136.      <li>
  137.         <strong>Was the wrapper called with the proper number of
  138.         arguments?</strong> 
  139.  
  140.         <p class="indent">
  141.           The wrapper will only execute if it is given the proper
  142.           number of arguments. The proper argument format is known
  143.           to the Apache web server. If the wrapper is not receiving
  144.           the proper number of arguments, it is either being
  145.           hacked, or there is something wrong with the suEXEC
  146.           portion of your Apache binary.
  147.         </p>
  148.       </li>
  149.  
  150.       <li>
  151.         <strong>Is this valid user allowed to run the
  152.         wrapper?</strong> 
  153.  
  154.         <p class="indent">
  155.           Is this user the user allowed to run this wrapper? Only
  156.           one user (the Apache user) is allowed to execute this
  157.           program.
  158.         </p>
  159.       </li>
  160.  
  161.       <li>
  162.         <strong>Does the target CGI or SSI program have an unsafe
  163.         hierarchical reference?</strong> 
  164.  
  165.         <p class="indent">
  166.           Does the target CGI or SSI program's path contain a leading
  167.           '/' or have a '..' backreference? These are not allowed; the
  168.           target CGI/SSI program must reside within suEXEC's document
  169.           root (see <code>--with-suexec-docroot=<em>DIR</em></code>
  170.           below).
  171.         </p>
  172.       </li>
  173.  
  174.       <li>
  175.         <strong>Is the target user name valid?</strong> 
  176.  
  177.         <p class="indent">
  178.           Does the target user exist?
  179.         </p>
  180.       </li>
  181.  
  182.       <li>
  183.         <strong>Is the target group name valid?</strong> 
  184.  
  185.         <p class="indent">
  186.           Does the target group exist?
  187.         </p>
  188.       </li>
  189.  
  190.       <li>
  191.         <strong>Is the target user <em>NOT</em> superuser?</strong>
  192.  
  193.  
  194.         <p class="indent">
  195.           Presently, suEXEC does not allow <code><em>root</em></code>
  196.           to execute CGI/SSI programs.
  197.         </p>
  198.       </li>
  199.  
  200.       <li>
  201.         <strong>Is the target userid <em>ABOVE</em> the minimum ID
  202.         number?</strong> 
  203.  
  204.         <p class="indent">
  205.           The minimum user ID number is specified during
  206.           configuration. This allows you to set the lowest possible
  207.           userid that will be allowed to execute CGI/SSI programs.
  208.           This is useful to block out "system" accounts.
  209.         </p>
  210.       </li>
  211.  
  212.       <li>
  213.         <strong>Is the target group <em>NOT</em> the superuser
  214.         group?</strong> 
  215.  
  216.         <p class="indent">
  217.           Presently, suEXEC does not allow the <code><em>root</em></code>
  218.           group to execute CGI/SSI programs.
  219.         </p>
  220.       </li>
  221.  
  222.       <li>
  223.         <strong>Is the target groupid <em>ABOVE</em> the minimum ID
  224.         number?</strong> 
  225.  
  226.         <p class="indent">
  227.           The minimum group ID number is specified during
  228.           configuration. This allows you to set the lowest possible
  229.           groupid that will be allowed to execute CGI/SSI programs.
  230.           This is useful to block out "system" groups.
  231.         </p>
  232.       </li>
  233.  
  234.       <li>
  235.         <strong>Can the wrapper successfully become the target user
  236.         and group?</strong> 
  237.  
  238.         <p class="indent">
  239.           Here is where the program becomes the target user and
  240.           group via setuid and setgid calls. The group access list
  241.           is also initialized with all of the groups of which the
  242.           user is a member.
  243.         </p>
  244.       </li>
  245.  
  246.       <li>
  247.         <strong>Can we change directory to the one in which the target
  248.         CGI/SSI program resides?</strong>
  249.  
  250.         <p class="indent">
  251.           If it doesn't exist, it can't very well contain files. If we
  252.           can't change directory to it, it might aswell not exist.
  253.         </p>
  254.       </li>
  255.  
  256.       <li>
  257.         <strong>Is the directory within the Apache
  258.         webspace?</strong> 
  259.  
  260.         <p class="indent">
  261.           If the request is for a regular portion of the server, is
  262.           the requested directory within suEXEC's document root? If
  263.           the request is for a UserDir, is the requested directory
  264.           within the directory configured as suEXEC's userdir (see
  265.           <a href="#install">suEXEC's configuration options</a>)?
  266.         </p>
  267.       </li>
  268.  
  269.       <li>
  270.         <strong>Is the directory <em>NOT</em> writable by anyone
  271.         else?</strong> 
  272.  
  273.         <p class="indent">
  274.           We don't want to open up the directory to others; only
  275.           the owner user may be able to alter this directories
  276.           contents.
  277.         </p>
  278.       </li>
  279.  
  280.       <li>
  281.         <strong>Does the target CGI/SSI program exist?</strong> 
  282.  
  283.         <p class="indent">
  284.           If it doesn't exists, it can't very well be executed.
  285.         </p>
  286.       </li>
  287.  
  288.       <li>
  289.         <strong>Is the target CGI/SSI program <em>NOT</em> writable
  290.         by anyone else?</strong> 
  291.  
  292.         <p class="indent">
  293.           We don't want to give anyone other than the owner the
  294.           ability to change the CGI/SSI program.
  295.         </p>
  296.       </li>
  297.  
  298.       <li>
  299.         <strong>Is the target CGI/SSI program <em>NOT</em> setuid or
  300.         setgid?</strong> 
  301.  
  302.         <p class="indent">
  303.           We do not want to execute programs that will then change
  304.           our UID/GID again.
  305.         </p>
  306.       </li>
  307.  
  308.       <li>
  309.         <strong>Is the target user/group the same as the program's
  310.         user/group?</strong> 
  311.  
  312.         <p class="indent">
  313.           Is the user the owner of the file?
  314.         </p>
  315.       </li>
  316.  
  317.       <li>
  318.         <strong>Can we successfully clean the process environment
  319.         to ensure safe operations?</strong> 
  320.  
  321.         <p class="indent">
  322.           suEXEC cleans the process' environment by establishing a
  323.           safe execution PATH (defined during configuration), as
  324.           well as only passing through those variables whose names
  325.           are listed in the safe environment list (also created
  326.           during configuration).
  327.         </p>
  328.       </li>
  329.  
  330.       <li>
  331.         <strong>Can we successfully become the target CGI/SSI program
  332.         and execute?</strong> 
  333.  
  334.         <p class="indent">
  335.           Here is where suEXEC ends and the target CGI/SSI program begins.
  336.         </p>
  337.       </li>
  338.     </ol>
  339.  
  340.     <p>This is the standard operation of the
  341.     suEXEC wrapper's security model. It is somewhat stringent and
  342.     can impose new limitations and guidelines for CGI/SSI design,
  343.     but it was developed carefully step-by-step with security in
  344.     mind.</p>
  345.  
  346.     <p>For more information as to how this security
  347.     model can limit your possibilities in regards to server
  348.     configuration, as well as what security risks can be avoided
  349.     with a proper suEXEC setup, see the <a href="#jabberwock">"Beware the Jabberwock"</a> section of this
  350.     document.</p>
  351. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  352. <div class="section">
  353. <h2><a name="install" id="install">Configuring & Installing
  354.     suEXEC</a></h2>
  355.  
  356.     <p>Here's where we begin the fun.</p>
  357.  
  358.     <p><strong>suEXEC configuration
  359.     options</strong><br />
  360.     </p>
  361.  
  362.     <dl>
  363.       <dt><code>--enable-suexec</code></dt>
  364.  
  365.       <dd>This option enables the suEXEC feature which is never
  366.       installed or activated by default. At least one
  367.       <code>--with-suexec-xxxxx</code> option has to be provided
  368.       together with the <code>--enable-suexec</code> option to let
  369.       APACI accept your request for using the suEXEC feature.</dd>
  370.  
  371.       <dt><code>--with-suexec-bin=<em>PATH</em></code></dt>
  372.  
  373.       <dd>The path to the <code>suexec</code> binary must be hard-coded
  374.       in the server for security reasons. Use this option to override
  375.       the default path. <em>e.g.</em>
  376.       <code>--with-suexec-bin=/usr/sbin/suexec</code></dd>
  377.  
  378.       <dt><code>--with-suexec-caller=<em>UID</em></code></dt>
  379.  
  380.       <dd>The <a href="mod/mpm_common.html#user">username</a> under which
  381.       Apache normally runs. This is the only user allowed to
  382.       execute this program.</dd>
  383.  
  384.       <dt><code>--with-suexec-userdir=<em>DIR</em></code></dt>
  385.  
  386.       <dd>Define to be the subdirectory under users' home
  387.       directories where suEXEC access should be allowed. All
  388.       executables under this directory will be executable by suEXEC
  389.       as the user so they should be "safe" programs. If you are
  390.       using a "simple" UserDir directive (ie. one without a "*" in
  391.       it) this should be set to the same value. suEXEC will not
  392.       work properly in cases where the UserDir directive points to
  393.       a location that is not the same as the user's home directory
  394.       as referenced in the passwd file. Default value is
  395.       "public_html".<br />
  396.        If you have virtual hosts with a different UserDir for each,
  397.       you will need to define them to all reside in one parent
  398.       directory; then name that parent directory here. <strong>If
  399.       this is not defined properly, "~userdir" cgi requests will
  400.       not work!</strong></dd>
  401.  
  402.       <dt><code>--with-suexec-docroot=<em>DIR</em></code></dt>
  403.  
  404.       <dd>Define as the DocumentRoot set for Apache. This will be
  405.       the only hierarchy (aside from UserDirs) that can be used for
  406.       suEXEC behavior. The default directory is the <code>--datadir</code>
  407.       value with the suffix "/htdocs", <em>e.g.</em> if you configure
  408.       with "<code>--datadir=/home/apache</code>" the directory
  409.       "/home/apache/htdocs" is used as document root for the suEXEC
  410.       wrapper.</dd>
  411.  
  412.       <dt><code>--with-suexec-uidmin=<em>UID</em></code></dt>
  413.  
  414.       <dd>Define this as the lowest UID allowed to be a target user
  415.       for suEXEC. For most systems, 500 or 100 is common. Default
  416.       value is 100.</dd>
  417.  
  418.       <dt><code>--with-suexec-gidmin=<em>GID</em></code></dt>
  419.  
  420.       <dd>Define this as the lowest GID allowed to be a target
  421.       group for suEXEC. For most systems, 100 is common and
  422.       therefore used as default value.</dd>
  423.  
  424.       <dt><code>--with-suexec-logfile=<em>FILE</em></code></dt>
  425.  
  426.       <dd>This defines the filename to which all suEXEC
  427.       transactions and errors are logged (useful for auditing and
  428.       debugging purposes). By default the logfile is named
  429.       "suexec_log" and located in your standard logfile directory
  430.       (<code>--logfiledir</code>).</dd>
  431.  
  432.       <dt><code>--with-suexec-safepath=<em>PATH</em></code></dt>
  433.  
  434.       <dd>Define a safe PATH environment to pass to CGI
  435.       executables. Default value is
  436.       "/usr/local/bin:/usr/bin:/bin".</dd>
  437.     </dl>
  438.  
  439.     <p><strong>Checking your suEXEC
  440.     setup</strong><br />
  441.      Before you compile and install the suEXEC wrapper you can
  442.     check the configuration with the <code>--layout</code> option.<br />
  443.      Example output:</p>
  444.  
  445. <div class="example"><p><code>
  446.     suEXEC setup:<br />
  447.             suexec binary: /usr/local/apache2/sbin/suexec<br />
  448.             document root: /usr/local/apache2/share/htdocs<br />
  449.            userdir suffix: public_html<br />
  450.                   logfile: /usr/local/apache2/var/log/suexec_log<br />
  451.                 safe path: /usr/local/bin:/usr/bin:/bin<br />
  452.                 caller ID: www<br />
  453.           minimum user ID: 100<br />
  454.          minimum group ID: 100<br />
  455. </code></p></div>
  456.  
  457.     <p><strong>Compiling and installing the suEXEC
  458.     wrapper</strong><br />
  459.      If you have enabled the suEXEC feature with the
  460.     <code>--enable-suexec</code> option the <code>suexec</code> binary
  461.     (together with Apache itself) is automatically built if you execute
  462.     the <code>make</code> command.<br />
  463.      After all components have been built you can execute the
  464.     command <code>make install</code> to install them. The binary image
  465.     <code>suexec</code> is installed in the directory defined by the
  466.     <code>--sbindir</code> option. The default location is
  467.     "/usr/local/apache2/sbin/suexec".<br />
  468.      Please note that you need <strong><em>root
  469.     privileges</em></strong> for the installation step. In order
  470.     for the wrapper to set the user ID, it must be installed as
  471.     owner <code><em>root</em></code> and must have the setuserid
  472.     execution bit set for file modes.</p>
  473.  
  474.     <p><strong>Setting paranoid permissions</strong><br />
  475.     Although the suEXEC wrapper will check to ensure that its
  476.     caller is the correct user as specified with the
  477.     <code>--with-suexec-caller</code> configure option, there is
  478.     always the possibility that a system or library call suEXEC uses
  479.     before this check may be exploitable on your system. To counter
  480.     this, and because it is best-practise in general, you should use 
  481.     filesystem permissions to ensure that only the group Apache 
  482.     runs as may execute suEXEC.</p>
  483.  
  484.     <p>If for example, your web-server is configured to run as:</p>
  485.  
  486. <div class="example"><p><code>
  487.     User www<br />
  488.     Group webgroup<br />
  489. </code></p></div>
  490.  
  491.     <p>and <code>suexec</code> is installed at
  492.     "/usr/local/apache2/sbin/suexec", you should run:</p>
  493.  
  494. <div class="example"><p><code>
  495.     chgrp webgroup /usr/local/apache2/bin/suexec<br />
  496.     chmod 4750 /usr/local/apache2/bin/suexec<br />
  497. </code></p></div>
  498.  
  499.     <p>This will ensure that only the group Apache runs as can even
  500.     execute the suEXEC wrapper.</p>
  501. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  502. <div class="section">
  503. <h2><a name="enable" id="enable">Enabling & Disabling
  504.     suEXEC</a></h2>
  505.  
  506.     <p>Upon startup of Apache, it looks for the file
  507.     <code>suexec</code> in the directory defined by the
  508.     <code>--sbindir</code> option (default is
  509.     "/usr/local/apache/sbin/suexec"). If Apache finds a properly
  510.     configured suEXEC wrapper, it will print the following message
  511.     to the error log:</p>
  512.  
  513. <div class="example"><p><code>
  514.     [notice] suEXEC mechanism enabled (wrapper: <em>/path/to/suexec</em>)
  515. </code></p></div>
  516.  
  517.     <p>If you don't see this message at server startup, the server is
  518.     most likely not finding the wrapper program where it expects
  519.     it, or the executable is not installed <em>setuid root</em>.</p>
  520.  
  521.      <p>If you want to enable the suEXEC mechanism for the first time
  522.     and an Apache server is already running you must kill and
  523.     restart Apache. Restarting it with a simple HUP or USR1 signal
  524.     will not be enough. </p>
  525.      <p>If you want to disable suEXEC you should kill and restart
  526.     Apache after you have removed the <code>suexec</code> file. </p>
  527. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  528. <div class="section">
  529. <h2><a name="usage" id="usage">Using suEXEC</a></h2>
  530.  
  531.     <p><strong>Virtual Hosts:</strong><br /> One way to use the suEXEC
  532.     wrapper is through the <code class="directive"><a href="./mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code> directive in
  533.     <code class="directive"><a href="./mod/core.html#virtualhost">VirtualHost</a></code> definitions.  By
  534.     setting this directive to values different from the main server
  535.     user ID, all requests for CGI resources will be executed as the
  536.     <em>User</em> and <em>Group</em> defined for that <code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code>. If this
  537.     directive is not specified for a <code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code> then the main server userid
  538.     is assumed.</p>
  539.  
  540.     <p><strong>User directories:</strong><br />
  541.      The suEXEC wrapper can also be used to execute CGI programs as
  542.     the user to which the request is being directed. This is
  543.     accomplished by using the "<strong><code>~</code></strong>"
  544.     character prefixing the user ID for whom execution is desired.
  545.     The only requirement needed for this feature to work is for CGI
  546.     execution to be enabled for the user and that the script must
  547.     meet the scrutiny of the <a href="#model">security checks</a>
  548.     above.</p>
  549. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  550. <div class="section">
  551. <h2><a name="debug" id="debug">Debugging suEXEC</a></h2>
  552.  
  553.     <p>The suEXEC wrapper will write log information
  554.     to the file defined with the <code>--with-suexec-logfile</code>
  555.     option as indicated above. If you feel you have configured and
  556.     installed the wrapper properly, have a look at this log and the
  557.     error_log for the server to see where you may have gone astray.</p>
  558.  
  559. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  560. <div class="section">
  561. <h2><a name="jabberwock" id="jabberwock">Beware the Jabberwock:
  562.     Warnings & Examples</a></h2>
  563.  
  564.     <p><strong>NOTE!</strong> This section may not be
  565.     complete. For the latest revision of this section of the
  566.     documentation, see the Apache Group's <a href="http://httpd.apache.org/docs-2.0/suexec.html">Online
  567.     Documentation</a> version.</p>
  568.  
  569.     <p>There are a few points of interest regarding
  570.     the wrapper that can cause limitations on server setup. Please
  571.     review these before submitting any "bugs" regarding suEXEC.</p>
  572.  
  573.     <ul>
  574.       <li><strong>suEXEC Points Of Interest</strong></li>
  575.  
  576.       <li>
  577.         Hierarchy limitations 
  578.  
  579.         <p class="indent">
  580.           For security and efficiency reasons, all suEXEC requests
  581.           must remain within either a top-level document root for
  582.           virtual host requests, or one top-level personal document
  583.           root for userdir requests. For example, if you have four
  584.           VirtualHosts configured, you would need to structure all
  585.           of your VHosts' document roots off of one main Apache
  586.           document hierarchy to take advantage of suEXEC for
  587.           VirtualHosts. (Example forthcoming.)
  588.         </p>
  589.       </li>
  590.  
  591.       <li>
  592.         suEXEC's PATH environment variable 
  593.  
  594.         <p class="indent">
  595.           This can be a dangerous thing to change. Make certain
  596.           every path you include in this define is a
  597.           <strong>trusted</strong> directory. You don't want to
  598.           open people up to having someone from across the world
  599.           running a trojan horse on them.
  600.         </p>
  601.       </li>
  602.  
  603.       <li>
  604.         Altering the suEXEC code 
  605.  
  606.         <p class="indent">
  607.           Again, this can cause <strong>Big Trouble</strong> if you
  608.           try this without knowing what you are doing. Stay away
  609.           from it if at all possible.
  610.         </p>
  611.       </li>
  612.     </ul>
  613.  
  614. </div></div>
  615. <div class="bottomlang">
  616. <p><span>Available Languages: </span><a href="./en/suexec.html" title="English"> en </a> |
  617. <a href="./ja/suexec.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
  618. <a href="./ko/suexec.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
  619. </div><div id="footer">
  620. <p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
  621. <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>
  622. </body></html>