suexec.xml.ko revision d378be2a904a6e56925589d8278bf6136032e0a4
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="/style/manual.ko.xsl"?>
<!-- English Revision: 103936 -->
<!--
Copyright 2003-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manualpage metafile="suexec.xml.meta">
<title>suEXEC ����</title>
<summary>
<p><strong>suEXEC</strong> ����� ����ġ�� <strong>CGI</strong>��
<strong>SSI</strong> ���α׷��� �������� ������ ����� ID��
�ƴ� �ٸ� ����� ID�� �����ϵ��� �Ѵ�. ���� CGI�� SSI ���α׷���
�����ϸ� �������� ������ ����ڿ� ���� ����ڷ� �����Ѵ�.</p>
<p>�� ����� ������ ����ϸ� ����ڰ� ���� CGI�� SSI ���α׷���
�����ϰ� �����Ҷ� �߻��� �� �ִ� ���������� ����� ����
�� �ִ�. �׷��� suEXEC�� �������ϰ� �����Ǹ� ���� ������
��ǻ�Ϳ� ���ο� ���� ������ ���� �� �ִ�. ���� <em>setuid root</em>
���α׷��� �̷� ���α׷��� ���� ������ ����ϴٸ� suEXEC��
��������ʱ� ������� �ٶ���.</p>
</summary>
<section id="before"><title>�����ϱ� ��</title>
<p>�����ϱ� �� �켱 ����ġ�׷�� �� ������ ������ �����.</p>
<p>���� <strong>setuid</strong>�� <strong>setgid</strong>
����� ������ ���н��� �ü���� ����Ѵٰ� �����Ѵ�. ���
��ɾ� ���鵵 ���� ������ �Ѵ�. suEXEC�� �����ϴ� �ٸ� �÷�����
����ϴٸ� ������ �ٸ� �� �ִ�.</p>
<p>�ι�°, ����� ��ǻ�� ������ �⺻ ����� �� �ͼ��ϴٰ�
�����Ѵ�. ���⿡�� <strong>setuid/setgid</strong> ��ɰ�
�̵��� �ý��۰� ���ȿ� ��ġ�� ���� ���⿡ ���� ���ذ� ���Եȴ�.</p>
<p>����°, suEXEC �ڵ��� <strong>������������</strong>
������ ����Ѵٰ� �����Ѵ�. �����ڿ� ���� ��Ÿ�׽��͵���
suEXEC�� ��õ� ��� �ڵ带 ���ɽ����� �����ϰ� �˻��ߴ�.
�ڵ带 �����ϰ� �ϰ� Ȯ���� ������ �����ϱ����� ��� ���Ǹ�
��￴��. �� �ڵ带 �����ϸ� ����ġ���� ������ ���ο� ����
������ �߻��� �� �ִ�. ���� ���α׷��ֿ� ���� �ſ� �� �˰�
�ڵ带 ���캸������ ����ġ�׷�� �۾��� ������ �ǻ簡 ��ٸ�
suEXEC �ڵ带 ���������ʱ� <strong>������</strong> ���Ѵ�.</p>
<p>�׹�°���� ����������, ����ġ�׷��� suEXEC�� ����ġ
�⺻��ġ�� �������� <strong>�ʱ��</strong> �����ߴ�. �ᱹ
���ڰ� ���Ǹ� ��←�� suEXEC�� �����ؾ� �Ѵ�. suEXEC��
���� ������ �� ������� ���ڴ� �Ϲ����� ��ġ����� suEXEC��
��ġ�� �� �ִ�. suEXEC ����� ����ϴ� �ý����� ������ å������
���ڴ� �� ���������� �����ְ� ���캸�� �����ؾ� �Ѵ�.
�̷� ���� ������ suEXEC�� ����Ҹ�ŭ �����ְ� ��ȣ��
������� suEXEC�� ����ϵ��� ����ġ�׷��� ���ϱ� �����̴�.</p>
<p>������ ����ϱ� ���ϴ°�? �׷���? ����. ���� ��������!</p>
</section>
<section id="model"><title>suEXEC ���ȸ�</title>
<p>suEXEC�� �����ϰ� ��ġ�ϱ� �� �츮�� ���ȸ��� ����
�����Ѵ�. �̸� ���� ��Ȯ�� suEXEC �ȿ����� ���� ���� �Ͼ��
�ý����� ������ ���� ������ �����ؾ� ���� �� �� ������ ��
�ִ�.</p>
<p><strong>suEXEC</strong>�� ����ġ �������� �θ��� setuid
"wrapper" ���α׷��� ������� �Ѵ�. �� wrapper�� ���ڰ�
�ּ����� �ٸ� userid�� �����ϵ��� ������ CGI�� SSI ���α׷���
HTTP ��û�� ���� �Ҹ���. �̷� ��û�� ���� ����ġ�� suEXEC
wrapper���� ���α׷���� ���α׷��� ������ ����ڿ� �׷�
ID�� �����Ѵ�.</p>
<p>�׷��� wrapper�� ���� ������ ���� ����� ���и� �����Ѵ�.
�� ������ �ϳ��� �����ϸ� ���α׷��� ���з� ��ϵǰ� ����
���� �����Ѵ�. �������� ������ ������ ����Ѵ�:</p>
<ol>
<li>
<strong>wrapper�� �����ϴ� ����ڰ� �ý����� ��������
�������</strong>
<p class="indent">
wrapper�� �����ϴ� ����ڰ� ������ �ý����� ���������
Ȯ���Ѵ�.
</p>
</li>
<li>
<strong>������ ���� �ƱԸ�Ʈ�� wrapper�� �����ϴ°�?</strong>
<p class="indent">
wrapper�� ������ ���� �ƱԸ�Ʈ�� �־�߸� ����ȴ�.
����ġ �������� �� ������ �ȴ�. wrapper�� ������ ����
�ƱԸ�Ʈ�� �������ϸ� ��ŷ�Ǿ�ų� ����ġ�� suEXEC��
���� ������ �ִ� ���̴�.
</p>
</li>
<li>
<strong>�� ����ڰ� wrapper�� �����ϵ��� ���Ǿ�?</strong>
<p class="indent">
�� ����ڰ� wrapper�� �����ϵ��� ���Ǿ�? ����
�� �����(����ġ �����)���� �� ���α׷��� ������
�� �ִ�.
</p>
</li>
<li>
<strong>������ CGI�� SSI ���α׷��� ������������ ����������
�����°�?</strong>
<p class="indent">
������ CGI�� SSI ���α׷��� '/'�� �����ϰų� ������
'..'�� �����°�? �̵��� ����� �� ���. ������ CGI/SSI
���α׷��� suEXEC ���� root (�Ʒ�
<code>--with-suexec-docroot=<em>DIR</em></code> ���)
���� �־�� �Ѵ�.
</p>
</li>
<li>
<strong>������ ����ڸ��� ��ȿ�Ѱ�?</strong>
<p class="indent">
������ ����ڰ� �����ϴ°�?
</p>
</li>
<li>
<strong>������ �׷���� ��ȿ�Ѱ�?</strong>
<p class="indent">
������ �׷��� �����ϴ°�?
</p>
</li>
<li>
<strong>������ ����ڰ� superuser�� <em>�ƴѰ�</em>?</strong>
<p class="indent">
���� suEXEC�� <code><em>root</em></code>�� CGI/SSI
���α׷��� ������ �� ��� �Ѵ�.
</p>
</li>
<li>
<strong>������ userid�� �ּ� ID ���ں��� <em>ū��</em>?</strong>
<p class="indent">
�������� �ּ� ����� ID ���ڸ� �����Ѵ�. �׷��� CGI/SSI
���α׷��� ������ �� �ִ� userid�� �ּ�ġ�� ������
�� �ִ�. "�ý��ۿ�" ������ �����Ҷ� �����ϴ�.
</p>
</li>
<li>
<strong>������ �׷��� superuser �׷��� <em>�ƴѰ�</em>?</strong>
<p class="indent">
���� suEXEC�� <code><em>root</em></code> �׷��� CGI/SSI
���α׷��� ������ �� ��� �Ѵ�.
</p>
</li>
<li>
<strong>������ groupid�� �ּ� ID ���ں��� <em>ū��</em>?</strong>
<p class="indent">
�������� �ּ� �׷� ID ���ڸ� �����Ѵ�. �׷��� CGI/SSI
���α׷��� ������ �� �ִ� groupid�� �ּ�ġ�� ������
�� �ִ�. "�ý��ۿ�" �׷��� �����Ҷ� �����ϴ�.
</p>
</li>
<li>
<strong>wrapper�� ���������� ������ ����ڿ� �׷���
�� �� �ִ°�?</strong>
<p class="indent">
�� �ܰ迡�� ���α׷��� setuid�� setgid ȣ���� �Ͽ�
������ ����ڿ� �׷��� �ȴ�. ��, �׷� ���ٸ����
����ڰ� �ش�� ��� �׷����� �ʱ�ȭ�ȴ�.
</p>
</li>
<li>
<strong>CGI/SSI ���α׷��� �ִ� ���丮�� ���丮��
������ �� �ִ°�?</strong>
<p class="indent">
���丮�� �������� �ʴٸ� ������ ���� �� ���. �̰�����
���丮�� ������ �� ��ٸ� ���丮�� �������� ����
���̴�.
</p>
</li>
<li>
<strong>���丮�� ����ġ ���� �ȿ� �ִ°�?</strong>
<p class="indent">
������ �Ϲ����� �κ��� ��û�� ��� ��û�ϴ� ���丮��
suEXEC ���� root �Ʒ� �ִ°�? UserDir�� ��û�� ���
��û�ϴ� ���丮�� suEXEC userdir�� ������ (<a
href="#install">suEXEC ���� �ɼ�</a> ���) ���丮
�Ʒ��� �ִ°�?
</p>
</li>
<li>
<strong>�ٸ� ������ ���丮�� ��������� <em>��°�</em>?</strong>
<p class="indent">
���丮�� �ٸ� ������� ����α� �������ʴ´�. ����
�����ڸ��� ���丮 ������ ������ �� �ִ�.
</p>
</li>
<li>
<strong>������ CGI/SSI ���α׷��� �����ϴ°�?</strong>
<p class="indent">
���������ʴٸ� ������ ���� ���.
</p>
</li>
<li>
<strong>�ٸ� ������ ������ CGI/SSI ���α׷��� ���������
<em>��°�</em>?</strong>
<p class="indent">
�����ڿ� ������ CGI/SSI ���α׷��� �����ϱ� �������ʴ´�.
</p>
</li>
<li>
<strong>������ CGI/SSI ���α׷��� setuid�� setgid��
<em>�ƴѰ�</em>?</strong>
<p class="indent">
�츮�� ���α׷��� �ٽ� UID/GID�� �����ϱ� �������ʴ´�.
</p>
</li>
<li>
<strong>������ �����/�׷��� ���α׷��� �����/�׷�� ������?</strong>
<p class="indent">
����ڰ� ������ �������ΰ�?
</p>
</li>
<li>
<strong>������ ������ ���� ���μ����� ȯ�溯���� û����
�� �ִ°�?</strong>
<p class="indent">
suEXEC�� (�������� ������) ������ ���� PATH�� ���,
(�̰͵� �������� ����) ������ ȯ�溯�� ��Ͽ� ���ŵ�
������ ����� ���μ����� ȯ�溯���� �����.
</p>
</li>
<li>
<strong>���������� ������ CGI/SSI ���α׷��� ������
�� �ִ°�?</strong>
<p class="indent">
���⼭ suEXEC�� ������ ������ CGI/SSI ���α׷��� �����Ѵ�.
</p>
</li>
</ol>
<p>�̰��� suEXEC wrapper ���ȸ��� ǥ�� �����̴�. �ټ�
�����ϰ� CGI/SSI ���迡 ���ο� ������ ������, ������ ���ο�
�ΰ� �Ѵܰ辿 ���ɽ����� ���������.</p>
<p>�� ���� ���� ���� ������ � ������ �ִ����� ������
suEXEC �������� � ���� ������ ���� �� �ִ����� ���� ��
������ <a href="#jabberwock">"�ٽ� �ѹ� �����϶�"</a> ����
����϶�.</p>
</section>
<section id="install"><title>suEXEC ������ ��ġ</title>
<p>���� ����ִ� ������ �����Ѵ�.</p>
<p><strong>suEXEC ���� �ɼ�</strong><br />
</p>
<dl>
<dt><code>--enable-suexec</code></dt>
<dd>�� �ɼ��� �⺻������ ��ġ�ǰų� Ȱ��ȭ�����ʴ� suEXEC
����� Ȱ��ȭ�Ѵ�. APACI�� suEXEC�� �޾Ƶ��̷���
<code>--enable-suexec</code> �ɼǿܿ�
<code>--with-suexec-xxxxx</code> �ɼ��� �ּ��� �Ѱ�
�ʿ��ϴ�.</dd>
<dt><code>--with-suexec-bin=<em>PATH</em></code></dt>
<dd><code>suexec</code> ���̳ʸ� ��δ� ���Ȼ� ������
������ ��ϵǾ� �Ѵ�. ��� �⺻���� �����Ϸ��� �� �ɼ���
����Ѵ�. <em>���� ���</em>
<code>--with-suexec-bin=/usr/sbin/suexec</code></dd>
<dt><code>--with-suexec-caller=<em>UID</em></code></dt>
<dd>���� ����ġ�� �����ϴ� <a
href="mod/mpm_common.html#user">����ڸ�</a>. ���α׷���
������ �� �ִ� ������ ����ڴ�.</dd>
<dt><code>--with-suexec-userdir=<em>DIR</em></code></dt>
<dd>suEXEC ������ ���Ǵ� ����� Ȩ���丮�� �������丮��
�����Ѵ�. �� ���丮�� �ִ� ��� ���������� �������
suEXEC�� ����Ƿ�, ��� ���α׷��� "�����ؾ�" �Ѵ�. (����
���, ���� "*"�� ���) "������" UserDir ���þ ����Ѵٸ�
���� ���� �����ؾ� �Ѵ�. UserDir ���þ passwd ���Ͽ�
���� ����� Ȩ���丮�� �ٸ��� suEXEC�� ����������
�۵����� �ʴ´�. �⺻���� "public_html"�̴�.<br />
����ȣ��Ʈ���� ���� �ٸ� UserDir�� ����Ѵٸ� ��� ��
�θ� ���丮 �ȿ� �ֵ��� �����ؾ� �ϰ�, �� �θ� ���丮����
���� ��´�. <strong>�̷��� �������� ������, "~userdir"
cgi ��û�� �۵����� �ʴ´�!</strong></dd>
<dt><code>--with-suexec-docroot=<em>DIR</em></code></dt>
<dd>����ġ�� DocumentRoot�� �����Ѵ�. �̴� suEXEC�� �����
�� �ִ� (UserDirs�� ������) ������ ���̴�. �⺻ ���丮��
<code>--datadir</code> ���� "/htdocs"�� ���� ���̴�.
<em>���� ���</em> "<code>--datadir=/home/apache</code>"��
�����ߴٸ� suEXEC wrapper�� document root��
"/home/apache/htdocs" ���丮�� ����Ѵ�.</dd>
<dt><code>--with-suexec-uidmin=<em>UID</em></code></dt>
<dd>suEXEC���� ���������� ������� �ּ� UID�� �����Ѵ�.
��κ��� �ý��ۿ��� 500�̳� 100�� �����ϴ�. �⺻����
100�̴�.</dd>
<dt><code>--with-suexec-gidmin=<em>GID</em></code></dt>
<dd>suEXEC���� ���������� �׷��� �ּ� GID�� �����Ѵ�.
��κ��� �ý��ۿ��� 100�� �����ϹǷ� �� ���� �⺻���̴�.</dd>
<dt><code>--with-suexec-logfile=<em>FILE</em></code></dt>
<dd>��� suEXEC �۵��� ���� (���ó� ����� ���� ������)
����� �α����ϸ��� �����Ѵ�. �⺻������ �α������� �̸���
"suexec_log"�̰� ǥ�� �α����� ���丮��
(<code>--logfiledir</code>) ��ġ�Ѵ�.</dd>
<dt><code>--with-suexec-safepath=<em>PATH</em></code></dt>
<dd>CGI �������Ͽ� �Ѱ��� ������ PATH ȯ�溯���� �����Ѵ�.
�⺻���� "/usr/local/bin:/usr/bin:/bin"�̴�.</dd>
</dl>
<p><strong>suEXEC wrapper�� �������ϰ� ��ġ�ϱ�</strong><br />
<code>--enable-suexec</code> �ɼ����� suEXEC ����� �����ϰ���
��� <code>make</code> ��ɾ �����ϸ� <code>suexec</code>
���������� (����ġ�� �Բ�) �ڵ����� ��������.<br />
������ �������� �� <code>make install</code> ��ɾ
�����Ͽ� ��ġ�� �� �ִ�. ���̳ʸ����� <code>suexec</code>��
<code>--sbindir</code> �ɼ����� ������ ���丮�� ��ġ�ȴ�.
�⺻ ��ġ�� "/usr/local/apache2/sbin/suexec"�̴�.<br />
��ġ ������ <strong><em>root ����</em></strong>�� �ʿ�����
�����϶�. wrapper�� ����� ID�� �����ϱ����ؼ��� �����ڰ�
<code><em>root</em></code>�̰� ���ϸ��� setuserid �����Ʈ��
�����Ǿ� �Ѵ�.</p>
<p><strong>���������� ���Ѽ���</strong><br />
suEXEC wrapper�� �ڽ��� ������ ����ڰ� ���� �ɼ�
<code>--with-suexec-caller</code>�� ������ �ùٸ� ���������
Ȯ���� ������, �� �˻� ���� suEXEC�� ����ϴ� �ý���ȣ��
Ȥ�� ���̺귯�� �Լ��� ���۵Ǿ��� �� �ִ�. �̸� ����ϸ�
�Ϲ������� ���� �����̹Ƿ� ���� ����ġ�� �����ϴ� �׷츸��
suEXEC�� ������ �� �ֵ��� ���Ͻý��� ������ �����ؾ� �Ѵ�.</p>
<p>���� ���, �������� ������ ���� �����ϰ�:</p>
<example>
User www<br />
Group webgroup<br />
</example>
<p><code>suexec</code>�� "/usr/local/apache2/sbin/suexec"��
��ġ�Ͽ��ٸ�, ������ �����ؾ� �Ѵ�:</p>
<example>
chgrp webgroup /usr/local/apache2/bin/suexec<br />
chmod 4750 /usr/local/apache2/bin/suexec<br />
</example>
<p>�׷��� ���� ����ġ�� �����ϴ� �׷츸�� suEXEC wrapper��
������ �� �ִ�.</p>
</section>
<section id="enable"><title>suEXEC �� ����</title>
<p>����ġ�� �����Ҷ� <code>--sbindir</code> �ɼ����� ������
���丮���� <code>suexec</code> ������ (�⺻��
"/usr/local/apache2/sbin/suexec") ã�´�. ����ġ��
���������� ������ suEXEC wrapper�� �߰��ϸ� ���� �α�(error
log)�� ������ ���� ����Ѵ�:</p>
<example>
[notice] suEXEC mechanism enabled (wrapper: <em>/path/to/suexec</em>)
</example>
<p>���� �����߿� �̷� ������ ��ٸ� ������ ����� ��ҿ���
wrapper ���α׷��� ã�� ���߰ų�, ���������� <em>setuid
root</em>�� ��ġ�����ʾұ� ������ ���̴�.</p>
<p>ó������ suEXEC ����� ����ϰ� �Ͱ� �̹� ����ġ ������
�������̶��, ����ġ�� ���̰� �ٽ� �����ؾ� �Ѵ�. ������
HUP�̳� USR1 �ñ׳η� ������ϴ� �����δ� ������� �ʴ�. </p>
<p>suEXEC�� �Ȼ���Ϸ��� <code>suexec</code> ������ ������
����ġ�� ���̰� ������ؾ� �Ѵ�. </p>
</section>
<section id="usage"><title>suEXEC ����ϱ�</title>
<p>CGI ���α׷� ��û�� ��� <directive
module="mod_suexec">SuexecUserGroup</directive> ���þ
����� ����ȣ��Ʈ�� ��û�� �Ͽ��ų� <module>mod_userdir</module>��
��û�� ó���ϴ� ��쿡�� suEXEC wrapper�� ȣ���Ѵ�.</p>
<p><strong>����ȣ��Ʈ:</strong><br /> suEXEC wrapper��
����ϴ� �Ѱ��� ����� <directive
module="core">VirtualHost</directive> ���ǿ� <directive
module="mod_suexec">SuexecUserGroup</directive> ���þ
����ϴ� ���̴�. �� ���þ �ּ��� ����� ID�� �ٸ���
�����ϸ� CGI �ڿ��� ��� ��û�� <directive
module="core" type="section">VirtualHost</directive>����
������ <em>User</em>�� <em>Group</em>���� ����ȴ�. ��
���þ���� <directive module="core"
type="section">VirtualHost</directive>�� ������ �ּ���
userid�� ����Ѵ�.</p>
<p><strong>����� ���丮:</strong><br />
<module>mod_userdir</module>�� ��û�� ó���Ѵٸ� suEXEC
wrapper�� ȣ���Ͽ�, ��û�� ����� ���丮�� �ش��ϴ� �����
ID�� CGI ���α׷��� �����Ѵ�. �� ����� �����Ϸ��� �����
ID�� CGI�� ������ �� �ְ� ��ũ��Ʈ�� ���� <a href="#model">����
�˻�</a> �׸��� �����ؾ� �Ѵ�. <a href="#install">����
�ɼ�</a> <code>--with-suexec-userdir</code>�� ����϶�.</p> </section>
<section id="debug"><title>suEXEC ������ϱ�</title>
<p>suEXEC wrapper�� �α� ������ ������ �ٷ�
<code>--with-suexec-logfile</code> �ɼ����� ������ ���Ͽ�
����. wrapper�� �ùٷ� �����ϰ� ��ġ�ߴٸ� ��� �߸�Ǿ����
�� �α����Ͽ� ������ error_log�� �������.</p>
</section>
<section id="jabberwock"><title>�ٽ� �ѹ� �����϶�: ���� ����</title>
<p><strong>����!</strong> �� ������ �������� ���� �� �ִ�.
����ġ�׷��� <a
href="http://httpd.apache.org/docs-2.1/suexec.html">�¶���
����</a>���� �� ������ �ֽ����� ����϶�.</p>
<p>wrapper�� ���� ������ �����ϴ� ��� ��̷ο� ���� �ִ�.
suEXEC�� ��õ� "����"�� �����ϱ� �� �̵��� ���캸�� �ٶ���.</p>
<ul>
<li><strong>suEXEC ���� ����</strong></li>
<li>
���丮 ���� ����
<p class="indent">
���Ȱ� ȿ������ ���� ��� suEXEC ��û�� ����ȣ��Ʈ��
��� �ֻ��� document root Ȥ�� userdir ��û�� ���
�ֻ��� ���� document root �ȿ��� �߻��ؾ� �Ѵ�. ����
���, ����ȣ��Ʈ �װ��� �����ߴٸ� ����ȣ��Ʈ����
suEXEC�� �̿��ϱ����� ����ȣ��Ʈ�� document root��
�� ����ġ ���� �������� �ۿ� ������ �ʿ䰡 �ִ�.
(������ ������.)
</p>
</li>
<li>
suEXEC�� PATH ȯ�溯��
<p class="indent">
�����ϸ� ������ �� �ִ�. ���⿡ �����ϴ� ��� ��ΰ�
<strong>���� �� �ִ�</strong> ���丮���� Ȯ���϶�.
�� �������� �������� �װ��� �ִ� Ʈ���̸񸶸� �����ϱ�
������ ���� ���̴�.
</p>
</li>
<li>
suEXEC �ڵ� �����ϱ�
<p class="indent">
�ݺ��ؼ� ��������, ����� ������ �ϴ��� �𸣰� �õ��Ѵٸ�
<strong>ū ����</strong>�� �߻��� �� �ִ�. � ��쿡��
������������.
</p>
</li>
</ul>
</section>
</manualpage>