ProFTPD module mod_gzipfs



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

This module links against and uses zlib, the same compression library used by gzip. If you are trying to conserve space on your FTP server host, this module may be of use to you.

When a file is uploaded into a mod_gzipfs-configured directory, that file is automatically compressed before being written to disk; conversely, when downloading a file from a mod_gzipfs-configured directory, the file is automatically uncompressed before being sent to the client. Uncompressed files that are stored in a mod_gzipfs directory, when downloaded, will be received just fine by clients, as mod_gzipfs intelligently handles this case.

Files uploaded into a mod_gzipfs directory will be renamed to have a ".gz" file extension, and can be manipulated by gzip and zcat on the server. If a client requests a list of the files in a mod_gzipfs directory, those ".gz" extensions are hidden; thus the compression of this module is transparent to the client, and the user. This means, however, that if a client uploads a file that already ends in ".gz" into one of these directories, e.g. "file.gz", that file will show up in a directory listing as "file".

The most current version of mod_gzipfs 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


GzipFS

Syntax: GzipFS path [compression-factor]
Default: None
Context: server config, <VirtualHost>, <Global>, <Anonymous>
Module: mod_gzipfs
Compatibility: 1.2.5rc1 and later

This directive specifies a path to a directory. Files uploaded to that directory (and its subdirectories) will be automatically compressed, and files downloaded from that directory (and its subdirectories) will be automatically uncompressed. Multiple directories can be configured with multiple GzipFS directives.

The optional compression-factor parameter can be used to specify a compression level for incoming files. The parameter must be a number in the range of 0-9, 0 being the lowest level and 9 being the highest.

Example:

  # path can use "~/" notation, in which case the path is resolved after successful login
  GzipFS ~/public_ftp/gzip

  # use the maximum compression level
  GzipFS /path/to/upload/dir 9



Installation

After unpacking and patching the latest proftpd-1.2 source code, copy the mod_gzipfs.c file into:
  proftpd-dir/contrib/
Then follow the normal steps for using third-party modules in proftpd:
  ./configure --with-modules=mod_gzipfs
  make
  make install
Note that this module also requires that the zlib compression library also be installed on your system. This library is required by gzip, so if you have gzip, you probably have zlib.



Author: $Author: tj $
Last Updated: $Date: 2002/12/13 17:05:49 $


© Copyright 2000-2002 TJ Saunders
All Rights Reserved