Problems with moved data directory

Hi,

my snap installation is running on Ubuntu 18 without any issues. Now I’d like to move the data directory to a SMB share. For this I added an appropriate entry into my fstab, using file_mode 0770. The result looks fine to me (contents of data directory):

# ls -l /media/Nextcloud/data
total 0
drwxrwx--- 2 www-data www-data 0 Jul 26 14:06 appdata_ocknjnneqzlo
drwxrwx--- 2 www-data www-data 0 Jul 26 14:06 files_external
-rwxrwx--- 1 www-data www-data 0 Jul 26 14:06 index.html
-rwxrwx--- 1 www-data www-data 0 Jul 26 14:06 nextcloud.log
drwxrwx--- 2 www-data www-data 0 Jul 26 14:06 stefan

Of course I also changed the datadirectory entry in config.php and disabled/enabled the snap. When I open the web interface, everything also looks fine, i. e. all files are listed.

But as soon as I try to open a file, I get an error message. The message differs depending on the file type, but it seems the files can be listed, but their content is not accessible. The same is true when I open the share in Debian (mounted via Debian’s nextcloud integration). They are listed, but I cannot display or download anything.

I also tried to change the cifs user from www-data to root, because the files in /var/snap/nextcloud/common/nextcloud/data have user and group “root”. But this doesn’t make a difference.

What am I doing wrong? Thank you.

Best regards,
Stefan