rfc-4331

Quota and Size Properties for Distributed Authoring and Versioning (DAV) Collections

B. Korver, L. Dusseault
date2006-02 streamIETF areaapp wgwebdav statusPROPOSED STANDARD pages10 canonicalhttps://www.rfc-editor.org/rfc/rfc4331 doi10.17487/RFC4331
Web Distributed Authoring and Versioning (WebDAV) servers are frequently deployed with quota (size) limitations. This document discusses the properties and minor behaviors needed for clients to interoperate with quota (size) implementations on WebDAV repositories. [STANDARDS-TRACK]

Extracted elements (20)

design-rationale §2

Two live properties scoped to collections only (DAV:quota-available-bytes and DAV:quota-used-bytes) were chosen rather than per-resource properties because quota is inherently a collection-level concept borrowed from NFS (RFC 3530). Implementing just these two properties satisfies the interoperability requirements for quota-aware WebDAV clients.

http

interoperability-note §7

Clients must not assume DAV:quota-used-bytes equals the sum of DAV:getcontentlength properties for a collection's resources, because compression, metadata, and server-inserted content affect actual storage. Furthermore, quota may be tracked per user rather than per collection, so quota-used-bytes on a collection and its members may be identical.

http

interoperability-note §7

Deleting or overwriting a resource may not free the same amount of storage as indicated by DAV:getcontentlength, for example if the server moves files to a trash folder, retains old versions (as in versioning systems per RFC 3253), or uses reference counting.

http

interoperability-note §7

On some systems where quota is counted by collection, a sub-collection's quota may be larger than the parent collection's quota (e.g., /~milele/ capped at 100 MB but /~milele/public/ unlimited). Changing a parent collection's quota does not necessarily require changing descendant collection quotas.

http

interoperability-note §7

The size of a file on the client's filesystem or in a PUT message may not correspond to the server's storage requirement, so clients cannot predict with 100% accuracy whether a PUT will be allowed under the current quota.

http

normative-requirement §3 RECOMMENDED

A 403 Forbidden response is RECOMMENDED for attempts to write either the protected DAV:quota-available-bytes or the computed DAV:quota-used-bytes property; the server SHOULD include an XML error body with the <DAV:cannot-modify-protected-property/> precondition tag as defined by DeltaV (RFC 3253).

http

normative-requirement §2 MUST

A <DAV:allprop> PROPFIND request SHOULD NOT return DAV:quota-available-bytes or DAV:quota-used-bytes. However, these property names MUST be returned in a <DAV:propname> request for a resource that supports the properties, except when limits are infinite.

http

normative-requirement §3 SHOULD

Clients SHOULD expect that as DAV:quota-available-bytes approaches 0, further allocations may be refused. A value of 0 indicates that write operations adding new data will probably fail, though overwriting an existing resource of equal size may still succeed.

http

normative-requirement §4 MUST

DAV:quota-used-bytes MUST include the total count of storage including usage derived from sub-resources if appropriate, and SHOULD include metadata storage size if metadata is counted against the quota.

http

normative-requirement §3 MAY

For resources with no enforced quota or unlimited storage, the server MAY omit DAV:quota-available-bytes (returning 404 in Multi-Status), though the specification RECOMMENDS returning an appropriate value such as available disk space.

http

normative-requirement §3 REQUIRED

Support for DAV:quota-available-bytes is REQUIRED on collections and OPTIONAL on other resources. A server SHOULD implement this property for each resource that also has DAV:quota-used-bytes.

http

normative-requirement §4 REQUIRED

Support for DAV:quota-used-bytes is REQUIRED on collections and OPTIONAL on other resources. A server SHOULD implement this property for each resource that also has DAV:quota-available-bytes.

http

normative-requirement §6 MUST NOT

The DAV:quota-not-exceeded precondition requires that the request MUST NOT cause the allocated quota to be exceeded. The DAV:sufficient-disk-space precondition requires that there is sufficient physical space to execute the request.

http

normative-requirement §6 SHOULD

The HTTP 507 (Insufficient Storage) status code SHOULD be used when a client request (PUT, PROPFIND, MKCOL, MOVE, or COPY) fails because it would exceed quota or physical storage limits. The server SHOULD include an XML error body with the appropriate precondition tag.

http

normative-requirement §3 SHOULD

When a server reports DAV:quota-available-bytes and there are multiple overlapping limits, it SHOULD choose among those limits in a repeatable way — either configured per repository or by selecting the smallest value.

http

protocol-element §3

DAV:quota-available-bytes is a live, protected property on collections (DAV: namespace) indicating the maximum additional storage in octets that can be allocated to a resource before further allocations are refused. A value of 0 means writes will likely be refused, though overwriting an existing resource of equal size may still succeed.

http

protocol-element §4

DAV:quota-used-bytes is a live, computed property on collections (DAV: namespace) containing the amount of storage in octets counted against the quota for the resource and possibly related resources sharing the same quota pool. It must include sub-resource usage and should include metadata storage if that counts against the quota.

http

security-consideration §8

Exposing DAV:quota-available-bytes could theoretically help an attacker identify collections with more available storage, but this does not actually make it easier to store files without authorization. Conversely, DAV:quota-used-bytes can help administrators detect storage tampering or misuse by revealing unexpected changes in usage.

security, http

wire-format §3

DAV:quota-available-bytes is encoded as PCDATA (decimal integer string in octets) within a quota-available-bytes XML element in the DAV: namespace: <!ELEMENT quota-available-bytes (#PCDATA)>.

http

wire-format §4

DAV:quota-used-bytes is encoded as PCDATA (decimal integer string in octets) within a quota-used-bytes XML element in the DAV: namespace: <!ELEMENT quota-used-bytes (#PCDATA)>.

http