Problems with datadir on external hdd


my System is an Debian 8.5 with installed i-MSCP.

i created a new subdomain (cloud.MYDOMAIN.tld) and installed the Nextcloud inside the subdomain. All works fine but now i want to bring the data-directory on an external HDD witch i mounted on “/media/EXTHDD” on the HDD i created an directory called Data and under them there comes cloud and then the data-directory, wich i have moved from the webspace to the HDD.

Now i get an error that the file “ocdata” does not exist. No other error messages in any logfile.

I have searched via Google bu i can’t find anything that can helps me.

I touched an empty file named .ocdata an ocdata inside the datadir. Also i have changed the owner and the access to 644 on this two files but nothing changes on my errormessage.

I’am new to Nextcloud.
Please is there anybody how can help me with this problem?
Thanks a lot and best Regards,

Make sure that the whole folder is accessible by the webserver user:
sudo -u www-data ls -lisa /media/EXTHDD/data