Quota and Size Properties for Distributed Authoring and Versioning (DAV) Collections
Extracted elements (20)
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)>.
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)>.