title: Permission denied error - jenkins (shell script)
body: <p>I'm using a jenkinsfile to test one of our instances.
  For this I created a bash script.
  Problem is that jenkins doesn't have permissions to run the script. Any idea how to fix this?</p>
  
  <p>Jenkinsfile:</p>
  
  <pre><code> stage("Testing instances"){
      if (terragruntAction == 'apply' || terragruntAction == 'test'){
         echo "Testing"
         sh '../check_services.sh'
      }
   }
  </code></pre>
  
  <p>output:</p>
  
  <blockquote>
    <p>../check_services.sh: Permission denied</p>
  </blockquote>
  
  <p>I tried to do:</p>
  
  <pre><code>git update-index --chmod=+x check_services.sh 
  </code></pre>
  
  <p>on the git folder that gets checkouted by Jenkins but no luck.</p>
  
  <p>Any help, thanks in advance!</p>