WebDAV interface and file browser broken after update - error 403 on remote.php/dav/

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.2
Operating system and version (eg, Ubuntu 20.04): 20.04.5 LTS
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 8.1.14

The issue you are facing:

After updating to Nextcloud 25.0.2 and PHP 8.1 I get this nasty error in the Admin Overview:

Screenshot_20230110_160505

Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.

Also when accessing https://cloud.xxx.me/remote.php/dav/ the browser states:

Access denied.

Is this the first time you’ve seen this error? Y:

As I suspected some file permission problem I already did:

sudo chown -R www-data:www-data /var/www/cloud.xxx.me

The output of your Nextcloud log in Admin > Logging:

[cron] Error: TypeError: Cannot access offset of type string on string at <<closure>>

0. /var/www/cloud.xxx.me/lib/public/BackgroundJob/Job.php line 78
   OCA\Theming\Jobs\MigrateBackgroundImages->run()
1. /var/www/cloud.xxx.me/lib/public/BackgroundJob/QueuedJob.php line 58
   OCP\BackgroundJob\Job->start()
2. /var/www/cloud.xxx.me/lib/public/BackgroundJob/QueuedJob.php line 48
   OCP\BackgroundJob\QueuedJob->start()
3. /var/www/cloud.xxx.me/cron.php line 152
   OCP\BackgroundJob\QueuedJob->execute()

at 2023-01-10T14:00:03+00:00

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

<?php
$CONFIG = array (
  'passwordsalt' => 'PASSWORDSALT',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'cloud.xxx.me',
  ),
  'datadirectory' => '/var/www/cloud.xxx.me/data',
  'dbtype' => 'mysql',
  'version' => '25.0.2.3',
  'overwrite.cli.url' => 'https://cloud.xxx.me/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'dbpasword',
  'installed' => true,
  'instanceid' => 'id',
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'xxx.xx',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'xxx.xx',
  'mail_smtpport' => '587',
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => 'xxx@xxx',
  'mail_smtppassword' => 'xxx',
  'default_phone_region' => 'DE',
  'updater.secret' => 'x',
);

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

xxx.xxx.xxx.xxx - - [10/Jan/2023:16:09:27 +0100] "GET /remote.php/dav/ HTTP/1.1" 403 886 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"

So any help is appreciated to guide me how to debug this further.

Thanks a lot.

Can you try to modify line 49 (may be a bit different in your installation, though i also have 25.0.2, but in general, the stack trace you posted does not match my installation) of /lib/public/BackgroundJob/Job.php from:
protected $argument;
to:
protected $argument = ;