No updates available webui and ssh

Nextcloud version:
Operating system and version: webhosting
Apache or nginx version: Apache
PHP version: 7.4

Nextcloud works fine so far, but is not showing any information on updates in the overview of admin setting page.

When I try running ./occ via ssh I get this error:

Your data directory is invalid
Ensure there is a file called ".ocdata" in the root of the data directory.

Cannot create "data" directory
This can usually be fixed by giving the webserver write access to the root directory. See

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /PATH/domain.tld/lib/private/Console/Application.php:168
Stack trace:
#0 /PATH/domain.tld/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /PATH/domain.tld/occ(11): require_once('/PATH/dom...')

First thing to mention would be that the folder is there and as well in place, config.php is set correctly, the .ocdata file is there as well.

I have googled and read a bit through similar errors, but none which helped in my case. I checked chmod permissions. which are 770 on the data folder.

It would be lovely if I could get some help on this here in the forum.


A thing I just found which is new to me, there is a .htaccess file in the config folder containing:

# Section for Apache 2.4 to 2.6
<IfModule mod_authz_core.c>
  Require all denied
<IfModule mod_access_compat.c>
  Order Allow,Deny
  Deny from all
  Satisfy All

# Section for Apache 2.2
<IfModule !mod_authz_core.c>
  <IfModule !mod_access_compat.c>
    <IfModule mod_authz_host.c>
      Order Allow,Deny
      Deny from all
    Satisfy All

# Section for Apache 2.2 to 2.6
<IfModule mod_autoindex.c>
  IndexIgnore *