title: Proper way to perform privileged tasks from wsgi app
body: <p>I need to write a small wsgi app for manipulating iptables. I use nginx + uwsgi on Debian with <a href="https://pypi.python.org/pypi/python-iptables/" rel="nofollow">python-iptables</a> package. </p>
  
  <p>uwsgi runs as www-data user by default, so if I try to access iptables from my app I got <code>iptc.ip4tc.IPTCError: can't initialize filter: Permission denied (you must be root)</code>.</p>
  
  <p>Is there any workaround to this problem except running the whole wsgi app as root? And what should I do if I want to integrate my app with Django (I definitely don't want run all Django stuff as root)?</p>