Current File : //usr/share/doc/proftpd-1.3.5e/contrib/mod_copy.html
<!-- $Id: mod_copy.html,v 1.1 2010-03-10 19:20:43 castaglia Exp $ -->
<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/contrib/mod_copy.html,v $ -->

<html>
<head>
<title>ProFTPD module mod_copy</title>
</head>

<body bgcolor=white>

<hr>
<center>
<h2><b>ProFTPD module <code>mod_copy</code></b></h2>
</center>
<hr><br>

<p>
The <code>mod_copy</code> module implements <code>SITE CPFR</code>
and <code>SITE CPTO</code> commands (analogous to <code>RNFR</code> and
<code>RNTO</code>), which can be used to copy files/directories from one place
to another on the server without having to transfer the data to the client and
back.

<p>
This module is contained in the <code>mod_copy.c</code> file for
ProFTPD 1.3.<i>x</i>, and is not compiled by default.  Installation
instructions are discussed <a href="#Installation">here</a>.

<p>
The most current version of <code>mod_copy</code> is distributed with the
ProFTPD source code.

<h2>Author</h2>
<p>
Please contact TJ Saunders &lt;tj <i>at</i> castaglia.org&gt; with any
questions, concerns, or suggestions regarding this module.

<h2>Directives</h2>
<ul>
  <li><a href="#CopyEngine">CopyEngine</a>
</ul>

<h2><code>SITE</code> Commands</h2>
<ul>
  <li><a href="#SITE_CPFR">SITE CPFR</a>
  <li><a href="#SITE_CPTO">SITE CPTO</a>
</ul>

<p>
<hr>
<h2><a name="CopyEngine">CopyEngine</a></h2>
<strong>Syntax:</strong> CopyEngine <em>on|off</em><br>
<strong>Default:</strong> CopyEngine on<br>
<strong>Context:</strong> server config, <code>&lt;VirtualHost&gt;</code>, <code>&lt;Global&gt;</code><br>
<strong>Module:</strong> mod_radius<br>
<strong>Compatibility:</strong> 1.3.6rc1 and later

<p>
The <code>CopyEngine</code> directive enables or disables the module's
handling of <code>SITE COPY</code> <i>et al</i> commands.  If it is set to
<em>off</em> this module ignores these commands.

<p>
<hr>
<h2><a name="SITE_CPFR">SITE CPFR</a></h2>
This <code>SITE</code> command specifies the source file/directory to use
for copying from one place to another directly on the server.

<p>
The syntax for <code>SITE CPFR</code> is:
<pre>
  SITE CPFR <i>source-path</i>
</pre>

<p>
See also: <a href="#SITE_CPTO">SITE CPTO</a>

<hr>
<h2><a name="SITE_CPTO">SITE CPTO</a></h2>
This <code>SITE</code> command specifies the destination file/directory to use
for copying from one place to another directly on the server.

<p>
The syntax for <code>SITE CPTO</code> is:
<pre>
  SITE CPTO <i>destination-path</i> 
</pre>

<p>
A client wishing to copy a file/directory first sends a <code>SITE CPFR</code>
command, then a <code>SITE CPTO</code>; this is similar to how renames are
handled using <code>RNFR</code> and <code>RNTO</code>.

<p>
Use of these <code>SITE</code> command can be controlled via
<code>&lt;Limit&gt;<code> sections, <i>e.g.</i>:
<pre>
  &lt;Limit SITE_COPY&gt;
    AllowUser alex
    DenyAll
  &lt;/Limit&gt;
</pre>

<p>
See also: <a href="#SITE_CPFR">SITE CPFR</a>

<hr>
<h2><a name="Installation">Installation</a></h2>
To install <code>mod_copy</code>, copy the <code>mod_copy.c</code> file into:
<pre>
  <i>proftpd-dir</i>/contrib/
</pre>
after unpacking the latest proftpd-1.3.<i>x</i> source code.  For including
<code>mod_copy</code> as a staticly linked module:
<pre>
  ./configure --with-modules=mod_copy
</pre>
To build <code>mod_copy</code> as a DSO module:
<pre>
  ./configure --enable-dso --with-shared=mod_copy
</pre>
Then follow the usual steps:
<pre>
  make
  make install
</pre>

<p>
For those with an existing ProFTPD installation, you can use the
<code>prxs</code> tool to add <code>mod_copy</code>, as a DSO module, to
your existing server:
<pre>
  # prxs -c -i -d mod_copy.c
</pre>

<p>
<hr><br>

<font size=2><b><i>
&copy; Copyright 2009-2015 TJ Saunders<br>
 All Rights Reserved<br>
</i></b></font>

<hr><br>

</body>
</html>