Running cgi binaries as root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've installed Apache/2.2.9 on a Debian Embedded Linux system. On this embedded system I've compiled C programs to *binary* cgi scripts. These scripts are copied to the /var/www/cgi-bin directory and changed rights to 755. The scripts address IO-pins on the embedded system and for that reason the scripts need to be executed as root and not as the Apache www-data user.
The apache2.conf file contains the lines:
<VirtualHost *:80>
   DocumentRoot /var/www
   ScriptAlias /cgi-bin /var/www/cgi-bin/
  <Directory /var/www/cgi-bin/>
    Options ExecCGI
    AddHandler cgi-script .cgi .pl
  </Directory>
</VirtualHost>
 
If I run the scripts as root in the /var/www/cgi-bin directory all is fine. But when trying to run the scripts using Apache via a web page nothing happens. This is because the scripts are run as www-data user and the www-data user is not allowed to perform these actions. Suexec doesn't work either because suexec expects ascii written cgi/php/pl script.
What do I need to change to be able to execute the binary cgi scripts as root? And yes I'm awear of possible security issues.
 
Regards.

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux