CI Jenkins Permission denied on .sh file
<p>I am running into an issue which I've been researching on for days. Having given up, I've decided to ask here. </p>

<p>I am trying to fix a permission denied CI exception. The error below occurs when it is trying to run a .sh script. </p>

<pre><code>+ find . -name '*.sh' -type f -exec chmod +x '{}' ';'
+ scripts/run_ci.py --push-merge
/tmp/hudson1523957012397738349.sh: line 3: scripts/run_ci.py: Permission denied
Build step 'Execute shell' marked build as failure
</code></pre>

<p>I tried adding 'chmod' command inside CI's 'Execute Shell' but it didn't work. Below is exactly how I've written it. </p>

<pre><code>find . -name "*.sh" -exec chmod +x {} \;
</code></pre>

<p>In the error log however, the brackets and the semi-colon is executed with '   ' and backlash completely disappeared.</p>

<p>Additional note: I have also tried adding "" in the command and still receives error such as this:</p>

<pre><code>find . -name "*.sh" -exec chmod +x "{}" "\;" 
</code></pre>

<p>My question is: </p>

<ol>
<li><p>Could it be the '' sign that failed the command?</p></li>
<li><p>If so, how do I ensure the '' is not added into the command?</p></li>
<li><p>If not, how can I fix this permission issue for CI?</p></li>
</ol>

<p>Comment: </p>

<p>I can't comment down there for some reason but I will upvote your comments later when I am able to but thank you for pointing that out that the .py doesn't get the permission changed and the list dir thing as well. </p>

<p>I greatly appreciate it since I've been struggling with it for days now. TT.TT</p>