title: shell script running in php gives error .sh: Permission denied
body: <p>I am running a php file through browser which run the shell script but i recive the error &quot;.sh: Permission denied&quot;
  My Php File is</p>
  <pre><code>&lt;?php
  $output = shell_exec('/var/www/html/test.sh 2&gt;&amp;1');
  echo &quot;$output&quot;;
  </code></pre>
  <p>My Shell Script is</p>
  <pre><code>#! /bin/bash
  scp -r -i /home/ec2-user/key.pem /var/www/html/test ec2-user@172.16.11.12:/var/www/html/
  echo &quot;hello world&quot;
  </code></pre>
  <p>Any help will be appreciated</p>