[Solved]Owncloud doesn't found .ocdata file after have change the drive

root@DietPi:~# cat /var/www/owncloud/config/config.php | grep datadirectory
  'datadirectory' => '/mnt/ownclouddrive',

this is the output

ok do this

chown www-data:www-data /mnt/ownclouddrive/

This should allow web server access to data directory

Hi again,
I think is going to work now.
I’m not sure just because I’m trying to access using my DDNS domain and now, instead of before, it shows me:

“You are trying to access the server from a non trusted domain.
Contact your system admin. If you are an admin, configure the setting “trusted_domains” in config/config.php.
An example configuration is provided in config/config.sample.php or in the documentation.”

I think when I’ll be back in my network it will work. or it should :blush:.

I guess once I will have solved also the DHCP on my server maybe this setting will be useless. What do you think?

have a look into /var/www/owncloud/config/config.php. There is a section trusted_domains where you can add your DDNS as an additional line

  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '192.168.x.x',
    2 => 'DietPi4',
  ),

I have inserted my domain in the trusted and now it is working

perfect :slight_smile:

I just see that in this file I have:

'trusted_domains' =>
  array (
    0 => 'dietpi IP',
    1 => 'my router public IP',
    2 => 'my DDNS domain',
  ),

the router public IP, I think, changes every time the router goes off. Isn’t it?
Could it be the reason why I can’t reach the server using my DDNS domain when I’m in my network?

(see the topic https://dietpi.com/forum/t/solved-how-to-connect-outside-of-dietpi-network/6041/1)

Usually it should be the local IP instead of your public one

so the right configuration should be:

'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'dietpi static IP',
    2 => 'my DDNS domain',
  ),

Is this correct?

you are not limited to these 3 lines, you could easily add a 4t or 5th one if needed. However Owncloud should tell you that a domain is not trusted as it already did :slight_smile:

Thanks again for your help. I guess if someone has the same problem could follow the thread from the beginning and come out easily.