0

I have a large wrapper.sh file which does a lot of things, but in the end runs catalina.sh tomcat.

Problem is that users who run this wrapper.sh are experiencing error: no permissions to execute catalina.sh. They have to manually set this permission, which is something I do not want.


On my computer, chmod u+x catalina.sh fixes this, therefore I included it in the wrapper.sh, right before executing catalina.sh:

#!/bin/sh
# <...>
# <...>
chmod +x catalina.sh
exec ./catalina.sh

But will this change work for everyone? I can imagine, for example, that it indeed works fine on my computer, but someone else would get some sudo-related error when implicitly running that chmod. How can I make it work for everyone?

2
  • 1
    You already posted this question on stackoverflow (and it already has two answers). Please don't multipost, just pick the most appropriate forum, and ask there. Commented Jun 21, 2021 at 8:10
  • Sorry, I did not know about superuser forum before.
    – Avaldor
    Commented Jun 21, 2021 at 8:11

0

You must log in to answer this question.

Browse other questions tagged .