## ProFTPD module `mod_case`

The `mod_case` module is designed to help ProFTPD be case-insensitive, for those sites that may need it (e.g. those that are migrating from a Windows environment or have mounted Windows filesystems).

`mod_case` works by performing two checks on the filename used in FTP commands. First, `mod_case` will scan the directory to see if there is already a file whose name exactly matches the given filename. If not, `mod_case` will scan the directory again, this time looking for case-insensitive matches.

This module is contained in the `mod_case.c` file for ProFTPD 1.3.x, and is not compiled by default. Installation instructions are discussed here.

The most current version of `mod_case` 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.

## Directives

- CaseEngine
- CaseIgnore
- CaseLog

## CaseEngine

Syntax: CaseEngine on|off
Default: off
Context: server config, `<VirtualHost>`, `<Global>`
Module: mod_case
Compatibility: 1.2.9 and later

The `CaseEngine` directive enables or disables the module's runtime case-matching engine. If it is set to off this module does no case-insensitive checking. Use this directive to disable the module instead of commenting out all `mod_case` directives.

## CaseIgnore

Syntax: CaseIgnore on|off|cmd-list
Default: off
Context: server config, `<VirtualHost>`, `<Global>`, `<Anonymous>`, `<Directory>`
Module: mod_case
Compatibility: 1.2.9 and later

The `CaseIgnore` directive is used to enable case-insensitive matching, possibly on a per-FTP command basis. If it is set to off, no case-insensitive matching is performed. If set to on, then case-insensitive matcing is performed for all FTP commands that `mod_case` handles (see below). Otherwise, one can configure a cmd-list, which is a comma-separated list of FTP commands for which `mod_case` is to do case-insensitive matching.

`mod_case` handles the following FTP commands: APPE, CWD, DELE, LIST, MDTM, MKD, MLSD, MLST, NLST, RETR, RMD, RNFR, RNTO, SIZE, STOR, XCWD, XMKD, and XRMD.

Examples:

      # Enable case-insensitivity for all FTP commands handled by mod_case
      CaseIgnore on

      # Enable case-insensitivity only for downloads
      CaseIgnore RETR

      # Enable case-insensitivity for uploads and downloads
      CaseIgnore APPE,RETR,STOR

## CaseLog

Syntax: CaseLog path|"none"
Default: None
Context: server config, `<VirtualHost>`, `<Global>`
Module: mod_case
Compatibility: 1.2.9 and later

The `CaseLog` directive is used to a specify a log file for `mod_case` reporting and debugging, and can be done a per-server basis. 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; this setting can be used to override a `CaseLog` setting inherited from a `<Global>` context.

## Installation

To install `mod_case`, copy the `mod_case.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_case
      make
      make install

Author: $Author: tj $
Last Updated: $Date: 2011/04/19 16:09:58 $

© Copyright 2004-2011 TJ Saunders
All Rights Reserved