Problems after upgrading to version 29

After upgrading to Next CloudHub version 8 (29.0.1), I get an error:

The data directory and files may be accessible from the Internet. The “.htaccess” file does not work. It is strongly recommended to configure the web server so that the data directory is not accessible from the external network, or to move the data directory outside the root directory of the web server

My data is here: /var/www/nextcloud-data
When transferring them to the /var/nextcloud-data directory and updating the path in the file config.php I’m getting an error:

The data directory is set incorrectly. Make sure that there is a file in the root of the data directory. “ocdata”. The data catalog is not writable.

Although I have assigned recording rights:
chown www-data:www-data -R /var/nextcloud-data

please use search - this issue was discussed often already - likely you find a solution e.g.

Frequent Nextcloud 29 (Hub 8) update issues

I have read these recommendations, but they are about configuring based on the Apache web server. I use the Nginx web server, and these recommendations do not suit me.

v29 runs these tests from the server-side rather than the client. If you weren’t getting this warning before, there’s a high probability the underlying cause is related to a somewhat different config matter in your environment that wasn’t visible before. Specifically:

The check runs tests against each of your configured trusted_domains and your overwrite.cli.url. It’s important that each of these domains:

  • is valid
  • are resolvable in DNS on your server (or from inside your container, if using Docker)
  • go to the same place on your server as they do externally

One hint is the ownership (you said you have changed the rights to www-user)
OK

but the second hint

in data dir needs to be a file called “.ocdata” - is that fullfilled as well?

It is a dot in the file name => hidden file (do you copy that over to the new directory as well? It is a 0 byte file

In trusted_domains, I left only the DNS name, deleting the local ip, but it didn’t help

File .ocdata is present, I copied it from the old directory

I’m coming to the conclusion that this is a bug of the 29th version. It was not fixed in 29.0.1 either. Moreover, in a clean installation, it does not play, and when updating an existing instance of NextCloud, it plays. Comparing configs did not add understanding.

As I said, your original warning was likely due to a change in the setup checks in v28+. You did not fill out the original support template so it’s challenging to provide further help.

If you’re using containers, confirm DNS resolution for your trusted_domains in the container are the same as when outside the container. That’s >50% of the cause across the environments I’ve seen.

What install method did you use?

I used a NON-container installation method. In trusted_domains, I only have the DNS name of my cloud and nothing else.

I solved this problem by using wildcard characters in config.php.
Example:

'trusted domains' =>
  array (
0 => '*.domain.com ',
),
1 Like

Hello,

it worked for me as well, but I would like to understand why !!

to understand, you need to know how server-side validation is performed

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.