BackupPC-users

Re: [BackupPC-users] CentOS 4.7 suid fails repeatedly with BackupPC

2008-12-16 11:26:10
Subject: Re: [BackupPC-users] CentOS 4.7 suid fails repeatedly with BackupPC
From: Les Mikesell <les AT futuresource DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 16 Dec 2008 10:23:22 -0600
Jim McNamara wrote:
> 
> I didn't think it was incompatible with CentOS, I'm just stuck in the 
> position of having done this probably 20 times on Debian without issue 
> (past the first) and now with my first try on CentOS, I'm floundering 
> badly. 

There should not be any issues with Centos.  Are you starting with the 
3.1 code from http://backuppc.sourceforge.net/?

> When I try to run the BackupPC script I still get the common "premature 
> end of script headers" message, and the most telling thing I find is in 
> the suexec.log file, which complains when I try to run BackupPC_Admin or 
> the testsetuid script from the wiki -

Suexec?  Are you trying to make apache do the suid part instead of perl?

> <http://192.168.0.231>] Premature end of script headers: BackupPC_Admin
> [Mon Dec 15 10:38:09 2008] [error] [client 192.168.0.231 

Is this supposed to be the default page?

> [root@telephony logs]# tail suexec.log
> [2008-12-15 10:37:00]: uid: (1010/backuppc) gid: (1010/1010) cmd: 
> BackupPC_Admin

Why is suexec involved?

> [2008-12-15 10:37:00]: file is either setuid or setgid: 
> (/var/www/cgi-bin/BackupPC_Admin)

Yes, the config.pl script should have installed it mode 04554.
It needs to be group-readable by apache, owned by backuppc and suid.

> I would love to find the suexec config, but google seems to indicate 
> that if you're unhappy with suexec, your only option is to compile your 
> own and remove the packeged version. That seems odd, but this whole rpm 
> thing seems fairly odd as well.

What made you think you even needed suexec?  Let apache execute perl as 
a normal cgi, let perl handle doing suid on a perl script.  You 
shouldn't even need to touch httpd.conf if you drop the BackupPC_Admin 
program under /var/www/cgi-bin which is already configured for program 
execution.  If you want to use mod_perl it becomes more complicated, but 
you don't spend enough time in the web interface to need the extra speed.


-- 
   Les Mikesell
      lesmikesell AT gmail DOT com

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>