222 lines
5.8 KiB
HTML
222 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>ProFTPD module mod_site_misc</title>
|
|
</head>
|
|
|
|
<body bgcolor=white>
|
|
|
|
<hr>
|
|
<center>
|
|
<h2><b>ProFTPD module <code>mod_site_misc</code></b></h2>
|
|
</center>
|
|
<hr><br>
|
|
|
|
<p>
|
|
The <code>mod_site_misc</code> module implements miscellaneous
|
|
<code>SITE</code> commands, such as:
|
|
<ul>
|
|
<li>SITE MKDIR
|
|
<li>SITE RMDIR
|
|
<li>SITE SYMLINK
|
|
<li>SITE UTIME
|
|
</ul>
|
|
|
|
<p>
|
|
This module is contained in the <code>contrib/mod_site_misc.c</code> file for
|
|
ProFTPD 1.2.<i>x</i>/1.3.<i>x</i>, and is not compiled by default.
|
|
Installation instructions are discussed <a href="#Installation">here</a>.
|
|
|
|
<h2>Author</h2>
|
|
<p>
|
|
Please contact TJ Saunders <tj <i>at</i> castaglia.org> with any
|
|
questions, concerns, or suggestions regarding this module.
|
|
|
|
<h2>Directives</h2>
|
|
<ul>
|
|
<li><a href="#SiteMiscEngine">SiteMiscEngine</a>
|
|
</ul>
|
|
|
|
<h2>Thanks</h2>
|
|
<p>
|
|
<i>2003-02-14</i>: Thanks to Kamil Burzynski (K.Burzynski <i>at</i> adbglobal.com) for providing <code>SITE MKDIR</code> and <code>SITE RMDIR</code> code<br>
|
|
<i>2003-10-27</i>: Thanks to Peter Hatch (pete <i>at</i> parcplace.net) for providing <code>SITE SYMLINK</code> code
|
|
|
|
<h2><code>SITE</code> Commands</h2>
|
|
<ul>
|
|
<li><a href="#SITE_MKDIR">SITE MKDIR</a>
|
|
<li><a href="#SITE_RMDIR">SITE RMDIR</a>
|
|
<li><a href="#SITE_SYMLINK">SITE SYMLINK</a>
|
|
<li><a href="#SITE_UTIME">SITE UTIME</a>
|
|
</ul>
|
|
|
|
<hr>
|
|
<h3><a name="SiteMiscEngine">SiteMiscEngine</a></h3>
|
|
<strong>Syntax:</strong> SiteMiscEngine <em>on|off</em><br>
|
|
<strong>Default:</strong> on<br>
|
|
<strong>Context:</strong> server config, <code><VirtualHost></code>, <code><Global></code><br>
|
|
<strong>Module:</strong> mod_site_misc<br>
|
|
<strong>Compatibility:</strong> 1.3.3c and later
|
|
|
|
<p>
|
|
The <code>SiteMiscEngine</code> directive enables or disables the module's
|
|
runtime support for the <code>SITE</code> commands. If set to <em>off</em>,
|
|
this module will not support these <code>SITE</code> commands. Use this
|
|
directive to disable the module.
|
|
|
|
<p>
|
|
<hr>
|
|
<h3><a name="SITE_MKDIR">SITE MKDIR</a></h3>
|
|
This <code>SITE</code> command allows the creation of a full directory
|
|
path, similar to <code>mkdir -p /path/to/dir</code>. It is primarily for
|
|
convenience, instead of having to use a loop of <code>MKD</code> and
|
|
<code>CWD</code> commands; the normal <code>MKD</code> FTP command only
|
|
creates a single directory at a time.
|
|
|
|
<p>
|
|
The syntax for <code>SITE MKDIR</code> is:
|
|
<pre>
|
|
SITE MKDIR <i>path</i>
|
|
</pre>
|
|
|
|
<p>
|
|
Use of this <code>SITE</code> command can be controlled via
|
|
<code><Limit></code> sections, <i>e.g.</i>:
|
|
<pre>
|
|
<Limit SITE_MKDIR>
|
|
AllowUser alex
|
|
DenyAll
|
|
</Limit>
|
|
</pre>
|
|
|
|
<p>
|
|
<hr>
|
|
<h3><a name="SITE_RMDIR">SITE RMDIR</a></h3>
|
|
This <code>SITE</code> command allows the deletion of a full directory
|
|
path, similar to <code>rm -fr /path/to/dir</code>. It recursively deletes all
|
|
of the files and directories under the given path. This command is
|
|
primarily for convenience, instead of having to use a loop of <code>NLST</code>,
|
|
<code>DELE</code>, and <code>CWD</code> commands; the normal <code>DELE</code>
|
|
FTP command only deletes a single file at a time, and the normal
|
|
<code>RMD</code> command does not handle removing directories that are not
|
|
empty.
|
|
|
|
<p>
|
|
The syntax for <code>SITE RMDIR</code> is:
|
|
<pre>
|
|
SITE RMDIR <i>path</i>
|
|
</pre>
|
|
|
|
<p>
|
|
Use of this <code>SITE</code> command can be controlled via
|
|
<code><Limit></code> sections, <i>e.g.</i>:
|
|
<pre>
|
|
<Limit SITE_RMDIR>
|
|
AllowUser alex
|
|
DenyAll
|
|
</Limit>
|
|
</pre>
|
|
|
|
<p>
|
|
<hr>
|
|
<h3><a name="SITE_SYMLINK">SITE SYMLINK</a></h3>
|
|
This <code>SITE</code> command allows the creation of symbolic links, similar
|
|
to <code>ln -s</code>.
|
|
|
|
<p>
|
|
The syntax for <code>SITE SYMLINK</code> is:
|
|
<pre>
|
|
SITE SYMLINK <i>source</i> <i>destination</i>
|
|
</pre>
|
|
|
|
<p>
|
|
Use of this <code>SITE</code> command can be controlled via
|
|
<code><Limit></code> sections, <i>e.g.</i>:
|
|
<pre>
|
|
<Limit SITE_SYMLINK>
|
|
AllowUser alex
|
|
DenyAll
|
|
</Limit>
|
|
</pre>
|
|
|
|
<p>
|
|
<hr>
|
|
<h3><a name="SITE_UTIME">SITE UTIME</a></h3>
|
|
This <code>SITE</code> command allows for setting the access and modification
|
|
timestamps on files, similar to the <code>touch /path/to/file</code> command.
|
|
This allows sites to have the often-requested ability to set the modification
|
|
time on uploaded files.
|
|
|
|
<p>
|
|
The syntax for <code>SITE UTIME</code> is:
|
|
<pre>
|
|
SITE UTIME <i>YYYYMMDDhhmm[ss]</i> <i>path</i>
|
|
</pre>
|
|
For example:
|
|
<pre>
|
|
SITE UTIME 200402240836 file.txt
|
|
SITE UTIME 20040224083655 file.txt
|
|
</pre>
|
|
to 8:36 AM, Febrary 24, 2004 (or 8:36:55 AM, Febrary 24, 2004, respectively).
|
|
|
|
<p>
|
|
Another variant syntax is also supported:
|
|
<pre>
|
|
SITE UTIME <i>path</i> <i>YYYYMMDDhhmm[ss]</i> <i>YYYYMMDDhhmm[ss]</i> <i>YYYYMMDDhhmm[ss]</i> UTC
|
|
</pre>
|
|
For example:
|
|
<pre>
|
|
SITE UTIME file.txt 20040224083655 20040224083655 20040224083655 UTC
|
|
</pre>
|
|
|
|
<p>
|
|
The timestamp specified is treated as being in GMT/UTC, rather than in the
|
|
local timezone.
|
|
|
|
<p>
|
|
Use of this <code>SITE</code> command can be controlled via
|
|
<code><Limit></code> sections, <i>e.g.</i>:
|
|
<pre>
|
|
<Limit SITE_UTIME>
|
|
AllowUser alex
|
|
DenyAll
|
|
</Limit>
|
|
</pre>
|
|
|
|
<p>
|
|
<hr>
|
|
<h2><a name="Installation">Installation</a></h2>
|
|
The <code>mod_site_misc</code> module is distributed with ProFTPD. Simply
|
|
follow the normal steps for using third-party modules in proftpd:
|
|
<pre>
|
|
$ ./configure --with-modules=mod_site_misc
|
|
</pre>
|
|
To build <code>mod_site_misc</code> as a DSO module:
|
|
<pre>
|
|
$ ./configure --enable-dso --with-shared=mod_site_misc
|
|
</pre>
|
|
Then follow the usual steps:
|
|
<pre>
|
|
$ make
|
|
$ make install
|
|
</pre>
|
|
|
|
<p>
|
|
Alternatively, if your <code>proftpd</code> was compiled with DSO support, you
|
|
can use the <code>prxs</code> tool to build <code>mod_site_misc</code> as a
|
|
shared module:
|
|
<pre>
|
|
$ prxs -c -i -d mod_site_misc.c
|
|
</pre>
|
|
|
|
<p>
|
|
<hr>
|
|
<font size=2><b><i>
|
|
© Copyright 2004-2017 TJ Saunders<br>
|
|
All Rights Reserved<br>
|
|
</i></b></font>
|
|
<hr>
|
|
|
|
</body>
|
|
</html>
|