Error After Moving Directory

Hi,
I moved my nextcloud directory from /var/www/directory1 to /var/www/directory2 and now I am getting an error when i load the page: " Error

  • Your data directory is invalidEnsure there is a file called “.ocdata” in the root of the data directory."

How do I fix this issue? The file is there, in /var/www/directory2/nextcloud/data/.ocdata but it still doesnt work. Anyone know a fix?

Thanks,
Kian

The search function of the forum provides you several matches on this topic and how to fix it:

https://help.nextcloud.com/search?q=move%20data%20directory

Will all my users, etc be removed, or is it all stored on the database?

Sorry, I don’t understand how this question is related to the subject “Error After Moving Directory” of your request?

I have moved my nextcloud to a different directory, and I am asking if my data will get removed because of this?