Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > ec0b02515a33f0b19d09c74a55ca3b36 > files > 4

apache-mod_put-2.0.9-5mdv2010.0.i586.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="G. Knauf">
   <meta name="GENERATOR" content="MED">
   <title>Module mod_put</title>
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
<table CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
<tr>
<td></td>

<td>
<hr NOSHADE WIDTH="100%"></td>

<td></td>
</tr>

<tr>
<td COLSPAN="2">
<h1>
Module <tt>mod_put</tt></h1>
<tt><font face="Arial, Helvetica"><font size=-2>Last change: 2004-02-18</font></font></tt></td>
</tr>

<tr>
<td WIDTH="14%">
<hr ALIGN=LEFT SIZE=6 NOSHADE WIDTH="100%"></td>

<td></td>

<td VALIGN=BOTTOM WIDTH="30%">
<hr SIZE=4 NOSHADE WIDTH="100%"></td>
</tr>
</table>

<h2>
Introduction</h2>

<ul>This small module implements the HTTP/1.1 <tt>PUT</tt> and <tt>DELETE</tt>
methods with Apache 2.x. Please notice that it can be a big security hole to 
activate them without securing the web server.</ul>

<h1>
<a href="mod_put-2.0.tar.gz">Download mod_put-2.0.tar.gz</a></h1>

<h2>
Configuration</h2>

<blockquote>
<h3>
Integration with Apache 2.x - compiling and linking</h3>
</blockquote>
The simple way is compiling with APXS. All you have to do is:
<ol>
<li>
Untar <tt>mod_put-2.0.tar.gz</tt> anywhere you wish</li>

<li>
Edit the <tt>Makefile</tt> file and change the path to /apache2/bin/apxs according your installation</li>

<li>
Build the module by typing <tt>make</tt></li>

<li>
Install the binary with <tt>make install</tt></li>

<li>
If you want the load command automatically added to your httpd.conf then type 
<tt>make installfirst</tt></li>

<li>
Restart Apache2.</li>
</ol>

<h4>
Example of a <tt>Configuration</tt> file</h4>

<pre>...

LoadModule negotiation_module  modules/mod_negotiation.o
LoadModule includes_module     modules/mod_include.o
LoadModule dir_module          modules/mod_dir.o
LoadModule cgi_module          modules/mod_cgi.o
...

#
# Miscellaneous modules
#

LoadModule put_module          modules/mod_put.o
</pre>

<h3>
<tt>httpd.conf</tt> Directives</h3>

<ul>
<dt>
PUT_EnablePut <i>On</i>|<i>Off</i></dt>

<dd>
<b>default value</b>: Off</dd>

<dd>
<b>context</b>: <tt>Directory</tt> or <tt>Location</tt></dd>

<dd>
<b>effect</b>: Enables (or disables) the <tt>PUT</tt> method.</dd>

<dd>
<b>remarks</b>: Before enabling the <tt>PUT</tt> method, be sure your server
is secure.</dd>

<br>Documents will be created with the rights of the user running <tt>httpd</tt>,
be sure to adjust the access rights accordingly.
<dt>
PUT_EnableDelete <i>On</i>|<i>Off</i></dt>

<dd>
<b>default value</b>: Off</dd>

<dd>
<b>context</b>: <tt>Directory</tt> or <tt>Location</tt></dd>

<dd>
<b>effect</b>: Enables (or disables) the <tt>DELETE</tt> method.</dd>

<dd>
<b>remarks</b>: Before enabling the <tt>DELETE</tt> method, be sure your
server is secure.</dd>

<dt>
PUT_DirMask <i>apr_fileperms_t value</i></dt>

<dd>
<b>default value</b>: APR_UREAD|APR_UWRITE|APR_UEXECUTE</dd>

<dd>
<b>context</b>: <tt>Directory</tt> or <tt>Location</tt></dd>

<dd>
<b>effect</b>: sets the permission for a whole directory (see <tt>APR</tt>).</dd>

<dt>
PUT_FileMask <i>apr_fileperms_t value</i></dt>

<dd>
<b>default value</b>: APR_UREAD|APR_UWRITE</dd>

<dd>
<b>context</b>: <tt>Directory</tt> or <tt>Location</tt></dd>

<dd>
<b>effect</b>: sets the permission for a single file.</dd>

<dt>
PUT_BlockSize <i>decimal value</i></dt>

<dd>
<b>default value</b>: 2048</dd>

<dd>
<b>context</b>: <tt>Directory</tt> or <tt>Location</tt></dd>

<dd>
<b>effect</b>: sets the internal blocksize used by the module for file buffers.</dd>

<table BORDER CELLSPACING=0 CELLPADDING=20 BGCOLOR="#FFF8DC" >
<tr>
<td>Allways ensure that write access is limited to trusted users: a malicious
user could upload huge files to freeze the file system. In particular,
never allow an anonymous write access if your web server is on the same
filesystem as your system or your users.</td>
</tr>
</table>
</ul>

<h3>
Example</h3>

<pre>&lt;Location /pub>
EnablePut On
AuthType Basic
AuthName Web publishing
AuthUserFile /www/etc/passwd
AuthGroupFile /www/etc/group
&lt;Limit PUT>
require valid-user
&lt;/Limit>
&lt;/Location></pre>
</blockquote>

<h2>
Remarks</h2>

<ul>
<ol>
<li>
The <i>Publish</i> function of Netscape Gold 3.01 sometimes doesn't work:
it returns quickly without any error message nor access to server.</li>

<li>
Depending on the rights you assigned to webuser (the user owning the <tt>httpd</tt>
process), uploaded files can be inaccessible for local users (quite benefic),
including the web administrator (definitely not a good idea), so adjust
the umask adequately.</li>

<li>
I've not personnaly tested the EBCDIC support (thanks to <a href="mailto:cweiss@us.ibm.com">Carolyn
Weiss</a> for EBCDIC patch), so if you experience problems with it, I'd
be happy to ear about it.</li>
</ol>
</ul>

<h2>
Software which supports the PUT method</h2>

<ul>
<li>
All Netscape versions with the composer component</li>
<li>
All newer Mozilla browsers with publish function</li>
<li>
W3C Amaya Open Source Editor/Browser: 
<a href="http://www.w3.org/Amaya/" target="_blank">http://www.w3.org/Amaya/</a></li>
<li>
W3C have also some command line utilities: 
<a href="http://www.w3.org/Library/Distribution.html" target="_blank">
http://www.w3.org/Library/Distribution.html</a></li>
<li>
there's a simple java PUT utility called Winie available:
<a href="http://jigsaw.w3.org/Winie/" target="_blank">http://jigsaw.w3.org/Winie/</a></li> 
<li>
the cURL commandline tool can upload files with the PUT method:
<a href="http://curl.haxx.se/" target="_blank">http://curl.haxx.se/</a></li> 
</ul>

<hr>
<center>Even if this software seems to be quite stable now, please do not
hesitate to send any comment, remark to</center>

<center>
<address>
<a href="mailto:info@gknw.de">G. Knauf</a></address></center>

</body>
</html>