SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
How to let the CGI work
Author Message
Post How to let the CGI work 
Hi,
Recently I have installed BackupPC2.1.0beta2 (2.1.0 was not out yet, except
the doc Wink and it took me a while to actually understand everything how it
works and my main problem was getting the CGI interface running.
I'm using APACHE2 on MDK10.0 Official and I didn't want to recompile it to
have perl in it. The sperl thing didn't work so I had to search for an
other solution, which i found in the book LINUX:
Rute User's Tutorial and Exposition (also online on sourceforge
http://rute.sourceforge.net/)
So here it is.
(/ __CGI-dir__/BackupPC_Admin is the location of your CGI-script)
write a small c file BackupPC.c
<code BackupPC.c>
#include <unistd.h>
int main (int argc, char *argv[])
{
setreuid (geteuid (), geteuid ());
execl ("/__CGI-dir__/BackupPC_Admin", "BackupPC_Admin", 0);
return 0;
}
</code BackupPC.c>
then compile it as root like
root# gcc BackupPC.c -o BackupPC_Admin.cgi -Wall
root# chown __backuppcuser__:__webgroup__ BackupPC_Admin.cgi
root# chmod a-w, o-rx, u+s BackupPC_Admin.cgi

instead of invoking BackupPC_Admin, call BackupPC_Admin.cgi
works like a charm

greets ciccio

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB