title: Run root script with Telegram Bot
body: <p>I have a WebHook configured to commuticate with Telegram Bot, and I want to run some root commands when bot command arrives. As we know the Telegram Bot sends https request to our web hook, so I can only run shell script as <strong>www-data</strong> user. But I actually want to run it as root.</p>
  
  <p>My script kill.sh:</p>
  
  <pre><code>#!/bin/bash
  
  kill -9 $1
  </code></pre>
  
  <p>From php I run:</p>
  
  <pre><code>exec('kill.sh ' . $pidFromTelegramMessage);
  </code></pre>
  
  <p>Rights:</p>
  
  <pre><code>$ ls -al kill.sh
  -r-xr-x---  1 root www-data     24 Dec 16 15:27 kill.sh*
  </code></pre>
  
  <p>I even tried to put this script in /tmp directory but i does not work either. A always gets: </p>
  
  <p><strong>/tmp/kill.sh: 3: kill: Operation not permitted</strong></p>