<!-- $Id: mod_site_misc.html,v 1.1 2004/11/03 19:37:45 castaglia Exp $ --> <!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_site_misc.html,v $ --> <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, 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>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> <h2><a name="SITE_MKDIR">SITE MKDIR</a></h2> 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> <h2><a name="SITE_RMDIR">SITE RMDIR</a></h2> 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> <h2><a name="SITE_SYMLINK">SITE SYMLINK</a></h2> 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> <h2><a name="SITE_UTIME">SITE UTIME</a></h2> 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</i> <i>path</i> </pre> For example: <pre> SITE UTIME 200402240836 file.txt </pre> would set the access and modification timestamps on <code>file.txt</code> to 8:36 AM, Febrary 24, 2004. <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 make make install </pre> <p> <hr><br> Author: <i>$Author: castaglia $</i><br> Last Updated: <i>$Date: 2004/11/03 19:37:45 $</i><br> <br><hr> <font size=2><b><i> © Copyright 2004 TJ Saunders<br> All Rights Reserved<br> </i></b></font> <hr><br> </body> </html>