Iâm stuck, and no resource I can find online has the solution I need.
I installed Nextcloud through Snap on Ubuntu 16.04, for convenience. It worked perfectly, but my SSD doesnât have the space I need, and I had to redirect Nextcloudâs data directory to /media/raid750/nextcloud/data. /media/raid750 is where my 750GB RAID1 array is mounted. Yes, Nextcloud has access to removable devices in the /media/ directory. The RAID array is in the Ext4 file system; the array was initially formatted in NTFS, but I reformatted to Ext4 because I thought that was the reason behind my following problem (it apparently wasnât).
When I try to connect to Nextcloud from another computer, I get the error:
Your data directory is readable by other users
Please change the permissions to 0770 so that the directory cannot be listed by other users.
I searched far and wide for a remedy to this issue. One of the suggestions was to enter the command âsudo chmod 0770 /media/raid750/nextcloudâ. I did this, and nothing changed: I still got the same error, even after restarting Nextcloud.
Another suggestion was to enter âsudo chown www-data:www-data /media/raid750/nextcloudâ. Instead of solving the problem, that command resulted in the following errors:
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 webserver write access to the root directory. See https://docs.nextcloud.com/server/12/go.php?to=admin-dir_permissions
This feels like a step farther away from the problem. Setting chown back to root for my directory takes me back to the first problem, changing the permissions to 0770. I really donât know what to do. Do I need to modify something in /etc/fstab, even though my array is Ext4? Please help. Thank you!