Debian Codegraph @

doc/contrib/mod_copy.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>ProFTPD module mod_copy</title>
5 </head>
6
7 <body bgcolor=white>
8
9 <hr>
10 <center>
11 <h2><b>ProFTPD module <code>mod_copy</code></b></h2>
12 </center>
13 <hr><br>
14
15 <p>
16 The <code>mod_copy</code> module implements <code>SITE CPFR</code>
17 and <code>SITE CPTO</code> commands (analogous to <code>RNFR</code> and
18 <code>RNTO</code>), which can be used to copy files/directories from one place
19 to another on the server without having to transfer the data to the client and
20 back.
21
22 <p>
23 This module is contained in the <code>mod_copy.c</code> file for
24 ProFTPD 1.3.<i>x</i>, and is not compiled by default. Installation
25 instructions are discussed <a href="#Installation">here</a>.
26
27 <p>
28 The most current version of <code>mod_copy</code> is distributed with the
29 ProFTPD source code.
30
31 <h2>Author</h2>
32 <p>
33 Please contact TJ Saunders &lt;tj <i>at</i> castaglia.org&gt; with any
34 questions, concerns, or suggestions regarding this module.
35
36 <h2>Directives</h2>
37 <ul>
38 <li><a href="#CopyEngine">CopyEngine</a>
39 <li><a href="#CopyOptions">CopyOptions</a>
40 </ul>
41
42 <h2><code>SITE</code> Commands</h2>
43 <ul>
44 <li><a href="#SITE_CPFR">SITE CPFR</a>
45 <li><a href="#SITE_CPTO">SITE CPTO</a>
46 </ul>
47
48 <p>
49 <hr>
50 <h3><a name="CopyEngine">CopyEngine</a></h3>
51 <strong>Syntax:</strong> CopyEngine <em>on|off</em><br>
52 <strong>Default:</strong> CopyEngine on<br>
53 <strong>Context:</strong> server config, <code>&lt;VirtualHost&gt;</code>, <code>&lt;Global&gt;</code><br>
54 <strong>Module:</strong> mod_copy<br>
55 <strong>Compatibility:</strong> 1.3.6rc1 and later
56
57 <p>
58 The <code>CopyEngine</code> directive enables or disables the module's
59 handling of <code>SITE COPY</code> <i>et al</i> commands. If it is set to
60 <em>off</em> this module ignores these commands.
61
62 <p>
63 <hr>
64 <h3><a name="CopyOptions">CopyOptions</a></h3>
65 <strong>Syntax:</strong> CopyOptions <em>opt1 ...</em><br>
66 <strong>Default:</strong> None<br>
67 <strong>Context:</strong> server config, <code>&lt;VirtualHost&gt;</code>, <code>&lt;Global&gt;</code><br>
68 <strong>Module:</strong> mod_copy<br>
69 <strong>Compatibility:</strong> 1.3.6rc3 and later
70
71 <p>
72 The <code>CopyOptions</code> directive is used to configure various optional
73 behavior of <code>mod_copy</code>.
74
75 <p>
76 The currently implemented options are:
77 <ul>
78 <li><code>NoDeleteOnFailure</code><br>
79 <p>
80 The <code>mod_copy</code> file, when a copying operation fails, will
81 delete the <i>destination</i> file by default. If, however, you <b>do</b>
82 want to keep that destination file when a failure happens, use this option.
83 </li>
84 </ul>
85
86 <p>
87 <hr>
88 <h3><a name="SITE_CPFR">SITE CPFR</a></h3>
89 This <code>SITE</code> command specifies the source file/directory to use
90 for copying from one place to another directly on the server.
91
92 <p>
93 The syntax for <code>SITE CPFR</code> is:
94 <pre>
95 SITE CPFR <i>source-path</i>
96 </pre>
97
98 <p>
99 See also: <a href="#SITE_CPTO">SITE CPTO</a>
100
101 <p>
102 <hr>
103 <h3><a name="SITE_CPTO">SITE CPTO</a></h3>
104 This <code>SITE</code> command specifies the destination file/directory to use
105 for copying from one place to another directly on the server.
106
107 <p>
108 The syntax for <code>SITE CPTO</code> is:
109 <pre>
110 SITE CPTO <i>destination-path</i>
111 </pre>
112
113 <p>
114 A client wishing to copy a file/directory first sends a <code>SITE CPFR</code>
115 command, then a <code>SITE CPTO</code>; this is similar to how renames are
116 handled using <code>RNFR</code> and <code>RNTO</code>.
117
118 <p>
119 Use of these <code>SITE</code> command can be controlled via
120 <code>&lt;Limit&gt;</code> sections, <i>e.g.</i>:
121 <pre>
122 &lt;Limit SITE_COPY&gt;
123 AllowUser alex
124 DenyAll
125 &lt;/Limit&gt;
126 </pre>
127
128 <p>
129 See also: <a href="#SITE_CPFR">SITE CPFR</a>
130
131 <p>
132 <b>Logging</b><br>
133 The <code>mod_copy</code> module supports <a href="../howto/Tracing.html">trace logging</a>, via the module-specific log channels:
134 <ul>
135 <li>copy
136 </ul>
137 Thus for trace logging, to aid in debugging, you would use the following in
138 your <code>proftpd.conf</code>:
139 <pre>
140 TraceLog /path/to/ftpd/trace.log
141 Trace copy:20
142 </pre>
143 This trace logging can generate large files; it is intended for debugging use
144 only, and should be removed from any production configuration.
145
146 <hr>
147 <h2><a name="Installation">Installation</a></h2>
148 The <code>mod_copy</code> module is distributed with ProFTPD. Simply follow
149 the normal steps for using third-party modules in ProFTPD. For including
150 <code>mod_copy</code> as a statically linked module:
151 <pre>
152 $ ./configure --with-modules=mod_copy
153 </pre>
154 To build <code>mod_copy</code> as a DSO module:
155 <pre>
156 $ ./configure --enable-dso --with-shared=mod_copy
157 </pre>
158 Then follow the usual steps:
159 <pre>
160 $ make
161 $ make install
162 </pre>
163
164 <p>
165 For those with an existing ProFTPD installation, you can use the
166 <code>prxs</code> tool to add <code>mod_copy</code>, as a DSO module, to
167 your existing server:
168 <pre>
169 $ prxs -c -i -d mod_copy.c
170 </pre>
171
172 <p>
173 <hr>
174 <font size=2><b><i>
175 &copy; Copyright 2009-2017 TJ Saunders<br>
176 All Rights Reserved<br>
177 </i></b></font>
178 <hr>
179
180 </body>
181 </html>