title: Permission Denied on Exec() w/ -rwxr-xr-x
body: <p>**I have tried permissions but still getting this error</p>
  
  <pre><code>Array ( [0] =&gt; sh: 1: /var/www/nodejs/tmp: Permission denied )
  </code></pre>
  
  <p>The command is execute from the route file of Laravel(MVC PHP Web application)</p>
  
  <p>Tried CHMOD 777 , CHMOD +x etc.</p>
  
  <p>My current permission is as follows</p>
  
  <pre><code>-rwxr-xr-x 1 root root *number* Oct 9 21:35 test.js
  </code></pre>
  
  <p>What did i not do?</p>
  
  <p>My php code</p>
  
  <pre><code>$user_input = "http://google.com/";
  
      putenv("PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs");
      exec('/var/www/nodejs/tmp test.js $user_input 2&gt;&amp;1',$output);
  
      print_r($output);   
  </code></pre>