ok found this one for Sonarr on DietPi user guide
https://dietpi.com/forum/t/resolved-execute-code-at-startup-automatically/92/1
pls have a look to Advanced settings in Sonarr and check if file mask is set to 664 as well as
folder mask is set to 775