Issue with a Nextcloud migration

  • Hello,

    i recently migrated a Nextcloud from one address to another.

    For the most part, the process was painless, but there is one issue i just can't solve.

    When i want to execute e.g. php occ i get this message:

    Code
    Your data directory is invalid.
    Ensure there is a file called ".ocdata" in the root of the data directory.
    
    Cannot create "data" directory.
    This can usually be fixed by giving the web server write access to the root directory. See https://docs.nextcloud.com/server/25/go.php?to=admin-dir_permissions

    I rechecked the permissions a dozen times, but every permission it needs should be there, meaning the root folder and the data folder are given 777 permissions. Which is obviously a bit overkill, but i just tried out a lot.

    If anyone can help me out here, i would be very glad.

    Best Regards

  • The SSH chroot directory (absolute path) in netcup webhosting environments is different for HTTP requests. Create a new configuation file (such as data.config.php) with this content: https://github.com/froonix/web…ud/config/data.config.php


    This should fix the mentioned occ error :)

    "Wer nur noch Enten sieht, hat die Kontrolle über seine Server verloren." (Netzentenfund)

    3 Mal editiert, zuletzt von KB19 ()

  • I had this once.


    Code
    .ocdata" in the root of the data directory.

    Just make with nano an empty file with the name .ocdata in the root of the data directory.

    It solved it for me.


    Backup your install before you do this, just to be sure.


    Regards,

    Jan