mod_site_misc
The mod_site_misc
module implements miscellaneous
SITE
commands, such as:
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.
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
Commands<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.
SITE
command allows the creation of a full directory
path, similar to mkdir -p /path/to/dir
. It is primarily for
convenience, instead of having to use a loop of MKD
and
CWD
commands; the normal MKD
FTP command only
creates a single directory at a time.
The syntax for SITE MKDIR
is:
SITE MKDIR path
Use of this
The syntax for
Use of this
The syntax for
Use of this
The syntax for
The timestamp specified is treated as being in GMT/UTC, rather than in the
local timezone.
Use of this
Alternatively, if your proftpd was compiled with DSO support, you can
use the
SITE
command can be controlled via
<Limit>
sections, e.g.:
<Limit SITE_MKDIR>
AllowUser alex
DenyAll
</Limit>
SITE RMDIR
This SITE
command allows the deletion of a full directory
path, similar to rm -fr /path/to/dir
. 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 NLST
,
DELE
, and CWD
commands; the normal DELE
FTP command only deletes a single file at a time, and the normal
RMD
command does not handle removing directories that are not
empty.
SITE RMDIR
is:
SITE RMDIR path
SITE
command can be controlled via
<Limit>
sections, e.g.:
<Limit SITE_RMDIR>
AllowUser alex
DenyAll
</Limit>
SITE SYMLINK
This SITE
command allows the creation of symbolic links, similar
to ln -s
.
SITE SYMLINK
is:
SITE SYMLINK source destination
SITE
command can be controlled via
<Limit>
sections, e.g.:
<Limit SITE_SYMLINK>
AllowUser alex
DenyAll
</Limit>
SITE UTIME
This SITE
command allows for setting the access and modification
timestamps on files, similar to the touch /path/to/file
command.
This allows sites to have the often-requested ability to set the modification
time on uploaded files.
SITE UTIME
is:
SITE UTIME YYYYMMDDhhmm[ss] path
For example:
SITE UTIME 200402240836 file.txt
SITE UTIME 20040224083655 file.txt
would set the access and modification timestamps on file.txt
to 8:36 AM, Febrary 24, 2004 (or 8:36:55 AM, Febrary 24, 2004, respectively).
SITE
command can be controlled via
<Limit>
sections, e.g.:
<Limit SITE_UTIME>
AllowUser alex
DenyAll
</Limit>
Installation
The mod_site_misc
module is distributed with ProFTPD. Simply
follow the normal steps for using third-party modules in proftpd:
./configure --with-modules=mod_site_misc
To build mod_site_misc
as a DSO module:
./configure --enable-dso --with-shared=mod_site_misc
Then follow the usual steps:
make
make install
prxs
tool to build mod_site_misc
as a shared
module:
prxs -c -i -d mod_site_misc.c
Author: $Author: castaglia $
Last Updated: $Date: 2014-05-04 19:49:57 $
© Copyright 2004-2014 TJ Saunders
All Rights Reserved