Skip to content

[Bug]: Cannot upload file that exactly fits the storage quota #60319

@saw-jan

Description

@saw-jan

⚠️ This issue respects the following points: ⚠️

Bug description

1️⃣ ❌ Cannot upload content that exactly fits the quota

curl -XPUT 'http://nextcloud.local/remote.php/dav/files/demo/lorem.txt' -d "1234567890" -u demo:demo -v
< HTTP/2 413
...
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>OCA\DAV\Connector\Sabre\Exception\EntityTooLarge</s:exception>
  <s:message>Insufficient space</s:message>
</d:error>

2️⃣ ❌ Cannot download the existing file if the storage is completely full.

When trying to download the file after the storage quota get completely used. (e.g: 10B/10B), the download request fails with 503 status error.

curl 'http://nextcloud.local/remote.php/dav/files/demo/lorem.txt' -u demo:demo -v
< HTTP/2 503
...
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\ServiceUnavailable</s:exception>
  <s:message>Could not open file: lorem.txt (345), file does seem to exist</s:message>
</d:error>

👉 NOTE: the above actions work in NC33 (Nextcloud Hub 26 Winter (33.0.2))

Steps to reproduce

Upload:

  1. Create a user with some bytes of quota (e.g: 10B)
  2. As new user, Upload a file that fits the 10B ❌

Donwload:

  1. As user, upload 8bytes file
  2. As admin, reduce the user quota to 8B
  3. As user, try to download that file ❌

Expected behavior

Should be able to download existing files.

Nextcloud Server version

34 (master): Nextcloud Hub 26 Spring (34.0.0 beta 4)

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap34-feedbackbug

    Type

    No fields configured for Bug.

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions