WebDAV - Quota extension (inofficial)

Preface | Description | Download | Installation | Apache configuration

Preface: (top)

This page is written by Marco Göbenich <mg at needful de>.
I only summarized this topic in english because of the japanese
website of Teruyuki SATAKE <satake at goodcrew ne jp>
who has also written this patch. See his website at
http://www.geocities.co.jp/Hollywood/4471/webdav/webdav.html.

Description: (top)

This patch allows to set an maximum size for a directory.
All uploads via WebDAV over this maximum will fail.

Download:(for Apache httpd-2.0.50) (top)

webdav-2.0.50-quota-2.2.patch

Installation: (top)

Installing apache from source:

# tar -xzf httpd_2.0.50.tar.gz
# cd httpd_2.0.50/
# patch -p2 /location/where/the/patch/is/webdav-2.0.50-quota-2.2.patch 
# ./buildconf
# ./configure \ --enable-modules=most \
--enable-mods-shared=all \ --enable-ssl \
--with-ssl=/usr/local/ssl # make # su
# make install

Installing Apache for Fedora Core 1:

Download httpd-2.0.50 as SRPM for Fedora Core 1

# rpm -i httpd-2.0.50-1.0.src.rpm
# cp webdav-2.0.50-quota-2.2.patch /usr/src/redhat/SOURCES/

- download my modified SPEC file (httpd-webdav-2.0.50-quota-2.2.spec)

# cp httpd-webdav-2.0.50-quota-2.2.spec /usr/src/redhat/SPECS/
# rpm -ba /usr/src/redhat/SPECS/httpd-webdav-2.0.50-quota-2.2.spec
# rpm -ivv /usr/src/redhat/RPMS/i386/httpd-*.rpm /usr/src/redhat/RPMS/i386/mod_ssl-*.rpm
# service httpd restart

Apache configuration: (top)

Only the DAVSATMaxAreaSize directive is added with this patch.
This directive takes only one argument, allowed size in KB of this directory.
Then mod_dav restricts the capacity of the specified directory.

DAVLockDB  /usr/local/apache2/logs/DAVLock
Alias     /dav-test-one     "/var/NAS/00001"
<Directory "/var/NAS/00001">
      DAV on
      #
      #     The capacity below this directory is restricted to 100MBytes.
      #
      DAVSATMaxAreaSize 102400
      Options FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all
</Directory>

Alias     /dav-test-two     "/var/NAS/00002"
<Directory "/var/NAS/00002">
      DAV on
      #
      #     The capacity below this directory is restricted to 100KBytes.
      #
      DAVSATMaxAreaSize 100
      Options FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all
</Directory>

In this example, capacity restriction is carried out at "/dav-test-one" 100MBytes,
and capacity restriction of "/dav-test-two" is carried out at 100KB.