How shall I define a Formula to create links in system directories


I’m creating a formula to patch an existing app, so I’d need my formula run the equivalent of

ln -s /usr/local/Cellar/mytemplate/0.1/template /Applications/MyApp/

I’m using prefix to get /usr/local/Cellar/mytemplate/0.1/template and then I tried with system and ln_sf but I’m always getting

ln: /Applications/MyApp/mytemplate: Operation not permitted

Note that /Applications/MyApp owner is the same user that is running the brew command.

After trying several things I cannot find a solution and I wonder if there’s any workaround or sample you can help me with please?

Kind Regards