Occ files:scan -> samba Permission denied

For any file access not carried out inside Nextcloud itself, it will be done in the context of the user www-data. Make sure the www-data user can access the mounted share.