title: PHP execute linux command using exec()
body: <p>So, i'm on my ubuntu server and want to execute the following command:</p>
  
  <pre><code>su -c /path/to/command -s /bin/bash -l otheruser
  </code></pre>
  
  <p>When i type this command in the linux command line, it perfectly asks for the password for the otheruser and executes the command.</p>
  
  <p>However, when i do it like this</p>
  
  <pre><code>exec("su -c /path/to/command -s /bin/bash -l otheruser");
  </code></pre>
  
  <p>it doesn't do anything. I haven't of course specified a password for it yet, but it doesn't really return anything that could help me solve this problem. I have set the permissions to that command to 777 for testing purposes.</p>
  
  <p>Any suggestions?</p>