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 most current version of mod_rcs can be found at:

  http://www.castaglia.org/proftpd/

Author

Please contact TJ Saunders <tj at castaglia.org> with any questions, concerns, or suggestions regarding this module.

Thanks

2002-01-30: Thanks to Gabe Frost <gfrost at gostnet.com> for the initial idea for this module.

Directives


RCSEngine

Syntax: RCSEngine on|off
Default: None
Context: server config, <VirtualHost>, <Global>, <Directory>
Module: mod_rcs
Compatibility: 1.2.5rc1 and later

The RCSEngine directive enables or disables the module's use of RCS.


RCSMode

Syntax: RCSMode octal-mode
Default: None
Context: server config, <VirtualHost>, <Global>, <Directory>
Module: mod_rcs
Compatibility: 1.2.5rc1 and later

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.


RCSOwner

Syntax: RCSOwner user group
Default: None
Context: server config, <VirtualHost>, <Global>, <Directory>
Module: mod_rcs
Compatibility: 1.2.5rc1 and later

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.

See Also: GroupOwner, UserOwner



Usage

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".



Installation

To install mod_rcs, copy the mod_rcs.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:
  ./configure --with-modules=mod_rcs
  make
  make install



Author: $Author: tj $
Last Updated: $Date: 2002/03/27 22:43:23 $


© Copyright 2000-2002 TJ Saunders
All Rights Reserved