Background Jobs not working and external data is not Scanned regularly

Hi,
i have a problem. I have a Nextcloud Running as Debian-VM on a Hyper-V-Host and it works quite okay. To have more space and accessable by other devices which only support Samba (e.g. my Printer/Scanner) and for Datadeduplication of Windows. I use an SMB-Share as “external storage”. I realized that Nextcloud after i enlarged this Share is not working correctly and the Files are not shown in the nextcloud and i ignored it. Now i have another problem because i have a Folder that cannot be deleted by Nextcloud. Priviously i deleted the Share, created it by nextcloud and then i could delete it. But now not anymore. Then i tried to fix this failure by changing the config.php with no success. Can someone help me?

Nextcloud version (eg, 20.0.5): Nextcloud Hub 7 (28.0.3)
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): Server version: Apache/2.4.38 (Debian)
PHP version (eg, 7.4): PHP 8.2.10 (cli)

The issue you are facing:
My Nextcloud does not scan the external data regularly (SMB-Share) and some Files who are created beside Nextcloud will not be shown and are downloadable. I also cant move Files correctly.

Is this the first time you’ve seen this error? (Y/N):
No. I saw this also before but i ignored it ^^

Steps to replicate it:

  1. Copy Files with Windows to the Nextcloud Share directly over SMB and not Nextcloud (or E.G. the Scanner sends a File to the smb-Share)
  2. The Files are not shown in Nextcloud

The output of your Nextcloud log in Admin > Logging:

{"reqId":"JMAFQKR95iWfRHVKyonh","level":3,"time":"2024-05-17T06:42:14+00:00","remoteAddr":"80.131.147.148","user":"471AF5F4-0AD5-40D6-A2DB-BA9120CB7B74","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/files/api/v1/templates/create","message":"Ungültiger Pfad","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0","version":"28.0.3.2","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"Ungültiger Pfad","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files/lib/Controller/TemplateController.php","line":80,"function":"createFromTemplate","class":"OC\\Files\\Template\\TemplateManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"create","class":"OCA\\Files\\Controller\\TemplateController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":65,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Files/Template/TemplateManager.php","Line":159,"message":"Ungültiger Pfad","exception":[],"CustomMessage":"Ungültiger Pfad"},"id":"66470372b1209"}

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

<?php
$CONFIG = array (
  'instanceid' => 'oce8ygchhza0',
  'passwordsalt' => 'xxxxxx',
  'secret' => 'xxxxxx',
  'trusted_domains' =>
  array (
    0 => 'nextcloud',
    1 => 'xxxx',
    2 => 'xxxx',
    3 => 'xxxx',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '28.0.3.2',
  'overwrite.cli.url' => 'https://nextcloud',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'xxxxx',
  'installed' => true,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'trusted_proxies' =>
  array (
    0 => 'nextcloud',
    1 => '192.168.168.25',
    2 => 'xxxx',
    3 => 'xxxx',
    4 => '192.168.168.41',
    5 => '192.168.168.24',
    7 => 'xxxx',
 ),
  'maintenance' => false,
  'updater.secret' => 'xxxx
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'loglevel' => 2,
  'theme' => '',
  'memories.exiftool' => '/var/www/nextcloud/apps/memories/bin-ext/exiftool-amd$
  'memories.vod.path' => '/var/www/nextcloud/apps/memories/bin-ext/go-vod-amd64$
  'memories.index.mode' => '2',
  'app_install_overwrite' =>
  array (
    0 => 'cfg_share_links',
  ),
'memcache.local' => '\OC\Memcache\APCu',

The output of your Apache/nginx/system log in /var/log/____:
The Access or Error?

huch noch keiner ne info?