Great to here you already solved it.
About permissions, in such cases it is best to add the software run user, which needs permissions, to the group of the directory owner group. By default on DietPi this would be usermod -a -G dietpi sonarr to allow Sonarr write to the default samba share.
About samba via internet:
Theoretically it’s possible to share SMB and NFS via internet, but it is definitely no recommended, as these network file servers do not handle latencies and broken connections very well. If you would want to do it regardless, then yes I think a VPN is safest then.
But usually there are better protocols, made for file transfer via internet. Depending on the control and complexity you want, have a look at:
- File browser (not yet implemented into dietpi-software, but very easy to install): https://dietpi.com/forum/t/software-suggestion-web-based-file-browser/2372/1
- Syncthing: https://dietpi.com/forum/t/dietpi-i2c-problem/66/1
- Nextcloud: https://dietpi.com/forum/t/dietpi-software-details-for-all-installation-options/22/75 or ownCloud: https://dietpi.com/forum/t/dietpi-software-details-for-all-installation-options/22/1