mod_digestmod_digest module offers functions to calculate the hash value or digest of files. This is particularly useful to verify the integrity of files.
This module was compiled and tested against ProFTPD 1.2.10 and 1.3.0 Installation instructions are discussed here.
The most current version of mod_digest can be found at:
http://www.smartftp.com/oss/proftpd/
Please contact Mathias Berchtold <mb at smartftp.com> with any questions, concerns, or suggestions regarding this module.
The DigestTypes directive configures the enabled digest/hash algorithms. If no DigestTypes directive is configured, then all digest algorithms are enabled.
Digest algorithms enabled are announced in the server FEAT reply. Following a list of digest types with the corresponding FTP command:
| Digest Type | FTP Command |
|---|---|
| crc32 | XCRC |
| md5 | XMD5 |
| sha1 | XSHA1 |
| sha256 | XSHA256 |
| all | Enables all |
The DigestMaxSize directive configures the maximum number of bytes a single hash command is allowed to read from a file.
If the number of bytes to be read from the file is greater than the configured limit the server will return an error.
If no DigestMaxSize directive is configured, then there is no limit. It is stronly recommended to set an upper limit.
mod_digest, copy the mod_digest.c file
into proftpd-dir/contrib/Unpack the latest proftpd-1.2.x source code, then follow the usual steps for using third-party modules in proftpd:
./configure --with-modules=mod_digest make make install
<IfModule mod_digest.c>
DigestTypes all
DigestMaxSize 104857600 # 100MB
</IfModule>