Client denied by server configuration: .ocdata

Here’s another solution.
Edit /www/nextcloud/data/.htaccess like below:

<ifModule mod_authz_core.c>
Require all denied
</ifModule>

<FilesMatch ".ocdata">
       <IfModule mod_authz_core.c>
          Require all granted
       </IfModule>
</FilesMatch>

# line below if for Apache 2.2
<ifModule !mod_authz_core.c>
deny from all
Satisfy All
</ifModule>

# section for Apache 2.2 and 2.4
<ifModule mod_autoindex.c>
IndexIgnore *
</ifModule>