got it working under a vm
you need to set the disk permission to user www-data.
here is a example if your 5Tb disk is /dev/sdb and has no data
first create a partition in your disk using all the space (5tb)
sudo fdisk /dev/sdb
n
[ENTER]
[ENTER]
[ENTER]
[ENTER]
w
next create a filesystem on it
sudo mkfs.ext4 /dev/sdb1
next we make sure this disk is mounted at boot running this command
echo “/dev/sdb1 /mnt/nc_data ext4 defaults 0 0” | sudo tee -a /etc/fstab
now we need to make the directories so we can mount it with
sudo mkdir /mnt/nc_data
sudo mount -a
now we need to create a directory for nextcloud to write to
sudo mkdir /mnt/nc_data/users
sudo chown www-data: /mnt/nc_data/users
sudo chmod 750 /mnt/nc_data/users
this should complete the disk preparation.
now we can add this drive in the nextcloud settings as posted above
under host point it to /mnt/nc_data/users
under container point to /srv/data this is the data path for the nextcloud setup it may point to anywhere
now you can setup nextcloud and use /srv/data as user-data-path.
now everything should work and the line in the config should be set to true or remove it.
this completes this tutorial
Best of luck.