I've setup my Raspberry Pi with nginx and fcgiwrap as CGI. I wanted to control GPIO ports using a Python script with the Rpi.GPIO library. The problem is that in order to be able to control the ports, I need to run python as root, therefore CGI as root.
I've read in this the question How to include RPi.GPIO in a python CGI script with lighttpd? that running a CGI server as root opens a big seccurity hole. Can you explain why?