title: lighttpd run python script as root
body: <p>I'm trying execute a python script from php function shell_exec(), but this script require root privileges. </p>
  
  <p>The python code is very simple. Using libraries wifi python does a scan of all the SSID and provides in output the information on the various wireless networks to which he had a scan in JSON format. WiFi libraries are scanning using iwlist that requires root privileges. If it is performed by a user who does not have root privileges, it returns only the information referring to the wifi where you are connected.</p>
  
  <p>If I plug in my code the string </p>
  
  <pre><code>&lt;?php
        echo 'Current script owner:'. get_current_user (); 
   ?&gt;
  </code></pre>
  
  <p>I print screen "Current script owner: root", but if I try to run my code</p>
  
  <pre><code>&lt;?php
      $ Output = shell_exec ("python /home/acme/XDOMV2/conn1.py");
      echo $ output;
   ?&gt;
  </code></pre>
  
  <p>It will only return information about the network on which my debian system is connected.
  How to use lighttpd webserver and I have followed several guides about getting to the only result of having to re-install lighttpd.
  The question is, is there a way to run a python script as root from lighttpd?
  Where am I wrong?</p>