Can't create data directory in a smb/cifs server directory

data directory must be owned by the webserver user in docker usually www-data. If you can’t change permission you need to troubleshoot it on the Linux level - nothing to do with Nextcloud itself.

see this post for default permission: