Per the external storage issue here:
https://github.com/nextcloud/nextcloud-snap/issues/150
I'm about 6 days and nights into this and still can't move data directory to external(technically not external-sata) 8tb drive without getting an error when logging back into the nextcloud web interface.
Does ASmiths post solve this or do I defer to OP or do I use Kernels Sanders symlink method? I've tried all methods on the thread using latest NC snap 13 + ubuntu 16, night after night to no avail.
I'm really trying to get the data directory moved to my external 8tb hdd since my ssd is only 120gb.
I could use some clarity on where to point new directory because of the local user path vs not using local user path as ASmith stated in thread.
Yes I am moving the directory with mv command after pointing in config. Done all these steps literally 20 times or more, with all the variations of paths, and methods. There has to be a "given" missing here, something noobs don't know to do automatically or something experienced users are assuming everyone knows to do.
Such as enabling external local storage @ web interface.
Could someone please point me to "how to move nc snap data directory for dummies" or noobs? A full, complete guide for moving nc data directory for snap 13?
Asmith was exactly right, STILL many conflicting things written about this.
Thanks In advance
Same problem at Ubuntu 16.04 LTS.
With the warning message(After i changed /datadirectory to /media/diskname/... ):
Your data directory is invalid Ensure there is a file called ".ocdata" in the root of the data directory.
Your data directory is not writable Permissions can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/13/go.php?to=admin-dir_permissions.
I try to solve the problem follow the message, but make no sense. Then i change datadirectory back,however the error message still here.
Had the same problem and wasted hours trying to figure it out. But it turned out that I just needed to run sudo snap connect nextcloud:removable-media to give it access to the /media/ directory. After that everything was fine. Also it seems that the owner of the data directory needs to be root if using the snap package. I got the same message about ".ocdata" missing when I changed the owner to www-data, changing it back to root resolved the problem.
Thanks @pip182 !
I got rid of the .ocdata error by creating the file manually:
cd /media/data and touch .ocdata
Most helpful comment
Had the same problem and wasted hours trying to figure it out. But it turned out that I just needed to run
sudo snap connect nextcloud:removable-mediato give it access to the /media/ directory. After that everything was fine. Also it seems that the owner of the data directory needs to be root if using the snap package. I got the same message about".ocdata"missing when I changed the owner towww-data, changing it back to root resolved the problem.