Make sure that the datadirectory parameter within your Nextcloud configuration file is pointing to the new location and that a file called “.ocdata” exists in that directory.
I get more or less the same error message after upgrading to NC18 (web upgrade).
I did not move my installation anywhere, and everything seems to be at the right place.
It was not possible to execute the cron job via CLI. The following technical errors have appeared:
La cartella dei dati non è valida Assicurati che ci sia un file ".ocdata" nella radice della cartella data.
Your data directory is not writable I permessi possono essere normalmente corretti fornendo al server web accesso in scrittura alla cartella radice. Vedi https://docs.nextcloud.com/server/18/go.php?to=admin-dir_permissions.
For some funny reasons part of the error messages are in italian…
Well, what i did to fix it was to go to Basic Settings, switch to Cron, then go back to overview, let the scan run and all went fine, then went back to Basic Settings and select AJAX back, then go back to Overview and let it run and that was it, it was fixed, idk if it will work for u guys but it did for me, i think its the 2nd time this has happened to me and i fixed it like this, cause i had the .ocdata file on my Nextcloud Data folder, plus the permissions and ownership was fine as well
I had this exact same problem while everything was seeming to work OK so I found your solution and it worked for me too!
Thanks. Now I just need to know what the cause is!
I recently replaced the hard-drive with the nextcloud data-directory in it to a new one, and ran rsync to replicate the data on the new drive. After testing the new setup for a week, everything was running as expected, but a similar error as on OP’s post appeared on my admin page. @javito’s solution fixed the issue in my case as well!