mod_msg
mod_msg
module allows system users to send messages to
connected clients via the ftpdctl
program. The module works by
creating a SysV message queue, which is used to pass messages from the daemon
process to session processes.
This module is contained in the mod_msg.c
file for
ProFTPD 1.2, and is not compiled by default. Installation instructions
are discussed here. Documentation on
mod_msg
usage follows.
The most current version of mod_msg
can be found at:
http://www.castaglia.org/proftpd/
Please contact TJ Saunders <tj at castaglia.org> with any questions, concerns, or suggestions regarding this module.
Example:
# Allow all users to send messages to connected clients MessageControlsACLs msg allow user *
<VirtualHost>
, <Global>
The MessageEngine
directive enables or disables the module's
runtime message queue. If it is set to off this module does no
passing of messages. Use this directive to disable the module instead of
commenting out all mod_msg
directives.
The MessageLog
directive is used to a specify a log file for
mod_msg
reporting and debugging. The path parameter must
be the full path to the file to use for logging. Note that this path must
not be to a world-writeable directory and, unless
AllowLogSymlinks
is explicitly set to on
(generally a bad idea), the path must not be a symbolic link.
If path is "none", no logging will be done at all.
The
The
Examples:
Example configuration:
MessageQueue
directive configures a path to a file that
mod_msg
will use when sending messages. This file itself is
not used for storing messages; it is necessary for obtaining a unique key
to use as the ID for the message queue.
Control Actions
Syntax: ftpdctl msg [class|host|user name]|[all] messagemsg
Purpose: Send a message to a class, host, user, or all
msg
control action can be used to send messages to connected
clients. Any words that follow the given user or host name in the
ftpdctl
command will be sent to the connected session, and added
to the response to the session's next FTP command. Note, however, that some
command responses cannot be altered, such as EPSV
,
PASV
, or STOU
; mod_msg
avoids these
command responses. Note: some FTP clients may not display the
text messages of FTP responses to the user; there is nothing that
mod_msg
can do when such clients are used.
ftpdctl msg user dave Dave, you need to delete some files
ftpdctl msg all This server will be going offline for maintenance soon
Installation
To install mod_msg
, copy the mod_msg.c
file into
proftpd-dir/contrib/
after unpacking the latest proftpd-1.2 source code. Then follow the usual
steps for using third-party modules in proftpd, making sure to include
the --enable-ctrls
configure option, which mod_msg
requires:
./configure --enable-ctrls --with-modules=mod_msg
make
make install
Usage
<IfModule mod_msg.c>
MessageEngine on
MessageLog /var/log/ftpd/msg.log
MessageQueue /var/ftpd/msg.queue
# Allow all system users to send messages
MessageControlsACLs msg allow user *
</IfModule>
Author: $Author: tj $
Last Updated: $Date: 2004/04/10 01:51:39 $
© Copyright 2004 TJ Saunders
All Rights Reserved