problem with ".ocdata"

hi, I installed nextcloud on ubuntu 18 and I moved the data directory on an external hdd … accessing remotely I get the error
"The data folder is not valid
Make sure there is a “.ocdata” file in the root of the given folder. "
I tried to search on various forums … but I could not solve

can you help me?
thank you so much!!
Cattura

Could you share some information on method used to install (link to guide)?
Steps you took to move the data directory?
Did you edit config.php?

‘datadirectory’ => ‘/var/www/nextcloud/data’,

should point to your external hdd data directory

yes, I edited config.php,
I made two attempts with a different guide but the result is always the same

I have the same problem ;(

Has someone already found a solution?