iconoclast_hero: umask 002 should do what you want. But in your command it probably does not apply to whatever is started by the exec sudo call
2024-01-03 00303, 2024
trolley has quit
2024-01-03 00329, 2024
outsidecontext
What about maybe have the directories where your files are located be owned by the media group and have the sticky bit set (chmod g+s)? That way files created there would inherit the group
2024-01-03 00331, 2024
trolley joined the channel
2024-01-03 00327, 2024
outsidecontext
That would also help for any file you put there with other applications