Updated to 23.0.4, now Sabre\DAV is broken

Nextcloud version (eg, 20.0.5): 23.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 (Mint)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4

The issue you are facing:
I updated to 23.0.4 5 days ago and since then Sabre\DAV is broken.
Security & setup warning: “Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken”
The files tab gives the error “You don’t have permission to upload or create files here” and doesn’t show any files.
The desktop client gives a HTTP 413: “No connection to Nextcloud at https://[domain]. Server replied “413 Request Entity Too Large” to “PROPFIND https://[domain]/remote.php/dav/files/[user]/” "
When logging in, it gives the following error (and does not log me in): " Request Entity Too Large. The requested resource does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.”
My phone also gives HTTP 413 errors.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Update from 23.0.3 to 23.0.4
  2. DAV breaks
  3. profit

The output of your Nextcloud log in Admin > Logging:

Sabre\DAV\Exception\BadRequest: Expected filesize of 37670 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "23.0.4.1",
    "overwrite.cli.url": "http:\/\/localhost",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "default_phone_region": "NL",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpsecure": "ssl",
    "twofactor_enforced": "true",
    "twofactor_enforced_groups": [],
    "twofactor_enforced_excluded_groups": [],
    "maintenance": false,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "loglevel": 2,
    "allow_local_remote_servers": true,
    "theme": ""
}

The output of your Apache/nginx/system log in /var/log/____:

[Wed Apr 27 13:03:07.954162 2022] [mpm_prefork:notice] [pid 1204] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Wed Apr 27 13:03:07.971054 2022] [http2:warn] [pid 1204] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Wed Apr 27 13:03:07.985776 2022] [mpm_prefork:notice] [pid 1204] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Wed Apr 27 13:03:07.985791 2022] [core:notice] [pid 1204] AH00094: Command line: '/usr/sbin/apache2'

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"JbzBrVqxyb9FxZEA3irr","level":3,"time":"2022-04-27T20:11:50+00:00","remoteAddr":"192.168.178.200","user":"[user]","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/[user]//InstantUpload/[folder]/[file].jpg","message":"Expected filesize of 37670 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.19.1","version":"23.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 37670 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":155,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":339,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":166,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":283,"CustomMessage":"--"}}

I took this screenshot of the logs just after the update finished

With the update, you didn’t change the permissions by accident during the update?
Storage full?

There’s plenty of free space on my secondary drive and I didn’t change any permissions. The data folder is still owned by www-data and www-data has read, write and execute permissions

I saw on Github that 23.0.4 was released 2 days ago but I updated 5 days ago. What is going on here?

Can also be buffer sizes and stuff like that:

What is strange why that changed for a minor update. Could also be that some process can’t write temporary stuff.

Can you read existing files from your Nextcloud? And writing creates the error, it is independent how you put it there, via client or web-interface?

I can’t read or write, both on the web interface and the desktop client. When I login in the web interface, it also gives a HTTP413. I can only access the web interface when I’m already logged in.