mod_site_misc
The mod_site_misc module implements miscellaneous SITE commands, such as:
SITE
This module is contained in the contrib/mod_site_misc.c file for ProFTPD 1.2.x/1.3.x, and is not compiled by default. Installation instructions are discussed here.
contrib/mod_site_misc.c
Please contact TJ Saunders <tj at castaglia.org> with any questions, concerns, or suggestions regarding this module.
2003-02-14: Thanks to Kamil Burzynski (K.Burzynski at adbglobal.com) for providing SITE MKDIR and SITE RMDIR code 2003-10-27: Thanks to Peter Hatch (pete at parcplace.net) for providing SITE SYMLINK code
SITE MKDIR
SITE RMDIR
SITE SYMLINK
<VirtualHost>
<Global>
The SiteMiscEngine directive enables or disables the module's runtime support for the SITE commands. If set to off, this module will not support these SITE commands. Use this directive to disable the module.
SiteMiscEngine
mkdir -p /path/to/dir
MKD
CWD
The syntax for SITE MKDIR is:
SITE MKDIR path
Use of this SITE command can be controlled via <Limit> sections, e.g.:
<Limit>
<Limit SITE_MKDIR> AllowUser alex DenyAll </Limit>
rm -fr /path/to/dir
NLST
DELE
RMD
The syntax for SITE RMDIR is:
SITE RMDIR path
<Limit SITE_RMDIR> AllowUser alex DenyAll </Limit>
ln -s
The syntax for SITE SYMLINK is:
SITE SYMLINK source destination
<Limit SITE_SYMLINK> AllowUser alex DenyAll </Limit>
touch /path/to/file
The syntax for SITE UTIME is:
SITE UTIME
SITE UTIME YYYYMMDDhhmm[ss] path
SITE UTIME 200402240836 file.txt SITE UTIME 20040224083655 file.txt
Another variant syntax is also supported:
SITE UTIME path YYYYMMDDhhmm[ss] YYYYMMDDhhmm[ss] YYYYMMDDhhmm[ss] UTC
SITE UTIME file.txt 20040224083655 20040224083655 20040224083655 UTC
The timestamp specified is treated as being in GMT/UTC, rather than in the local timezone.
<Limit SITE_UTIME> AllowUser alex DenyAll </Limit>
$ ./configure --with-modules=mod_site_misc
$ ./configure --enable-dso --with-shared=mod_site_misc
$ make $ make install
Alternatively, if your proftpd was compiled with DSO support, you can use the prxs tool to build mod_site_misc as a shared module:
proftpd
prxs
$ prxs -c -i -d mod_site_misc.c