ProFTPD module mod_rcs

This module is contained in the mod_rcs.c file for
ProFTPD 1.2, found here,
and is not compiled by default. Installation instructions are discussed
here.

This module is designed to provide basic version control transparently to
files uploaded to the server. It uses RCS as the version control system.
Some notes on the usage of this module follows the
configuration directive explanations.

The RCSMode directive is used to configure the mode of the file
once checked in. As documented in the RCS man pages, ci drops
all write bits on the checked-in file. When checking out the file using
co, though, only the user write bit is turned on. For files that
require group write permissions, as for shared files, the mode of the file
once uploaded and checked in can be set to the required mode using this
directive.

The RCSOwner directive is used to configure the ownership
of the uploaded file after check in. mod_rcs changes the
ownership of the file in order to undo some of the changes RCS makes, but
these changes cause any configured UserOwner or
GrouuOwner that apply to that context to be ignored as well.
Use this directive instead of UserOwner and
GroupOwner in that case.

For either the user or group parameters, a "~"
may be given, which will be substituted with the logged in user's UID
or primary GID as appropriate. This is to allow changing just the user
or the group ownership using one directive.

Usage of this module is fairly straightforward, as evidenced by the number
of configuration directives. There are issues to keep in mind, though.

First, RCS must be installed on the system; this is a very common tool, and so
is probably already there. As long as ci and co
are on the PATH seen by proftpd, this module will
work.

Unfortunately, RCS does not provide an API for applications such as
proftpd. One of the consequences of this is that use of
DefaultRoot will make the RCS commands inaccessible. To work
around this, either copy the binaries into the
DefaultRoot directory (not a good solution if
DefaultRoot ~ is being used), or use some of the filesystem
mounting tricks mentioned here.

mod_rcs uses root privileges to undo some of the mode and ownership
changes that RCS makes to RCS-controlled files; this is done to keep things
as transparent to the client as possible. This also means that if
mod_linuxprivs is in use as well, mod_rcs will
not be able to make the necessary changes; the log will show messages
of "Operation not permitted".