BackupPC-users

Re: [BackupPC-users] No web interface in new Ubuntu installation

2014-03-19 18:23:36
Subject: Re: [BackupPC-users] No web interface in new Ubuntu installation
From: Holger Parplies <wbppc AT parplies DOT de>
To: Magnus Larsson <magnus AT vista DOT se>
Date: Wed, 19 Mar 2014 23:13:49 +0100
Hi,

Magnus Larsson wrote on 2014-03-19 22:10:28 +0100 [Re: [BackupPC-users] No web 
interface in new Ubuntu installation]:
> Anyone got any ideas on why Backuppc webinterface does not work on 
> ubuntu 13.10?

yes. I use Debian, not Ubuntu, but I vaguely remember that some BackupPC
package or other shipped without correct permissions on the cgi script.
For reference, my cgi-bin directory looks like this (older version of
BackupPC, obviously, but the note should still apply):

% ls -al /usr/share/backuppc/cgi-bin/
total 4
drwxr-xr-x 2 root     root      104 Mar 15  2008 .
drwxr-xr-x 7 root     root      168 Oct  8  2007 ..
lrwxrwxrwx 1 root     root        8 Mar 15  2008 image -> ../image
-rwsr-xr-x 1 backuppc backuppc 3924 Feb  6  2007 index.cgi

meaning the directory itself is owned by root, not backuppc (I believe it
needs to be *world readable and searchable* regardless of ownership for HTTP
access anyway), and then the index.cgi (that's Debian/Ubuntu specific, the
original tarball ships with the script named BackupPC_Admin) is owned by the
backuppc user and set-uid (in order to have access to the pool, which should
normally *not* be world accessible - in any case the files probably won't be
created world readable, so having the top level directory accessible won't
help you much).

There are (or were?) at least two distinct possibilities of setting things up.
set-uid Perl scripts seem to be going away due to security concerns, so things
might have changed, but the configuration you posted does not really suggest
so.

Your 404 error sounds almost as if your index.cgi was not executable for the
web server (e.g.

-rwsr-x--- 1 backuppc backuppc 3924 Feb  6  2007 index.cgi

). I'm not sure whether the *script* needs o+x permission for web access, but
for testing, you could try these three steps (stop as soon as it works ;-):

        1# chgrp www-data /usr/share/backuppc/cgi-bin/index.cgi
        2# chmod o+x      /usr/share/backuppc/cgi-bin/index.cgi
        3# chmod o+r      /usr/share/backuppc/cgi-bin/index.cgi
        
> Any setting that might be wrong? Permissions in the cgi-bin directory......?

Well, we don't know the settings in your cgi-bin directory ;-), so, yes, they
might be wrong.


Does your system have SELinux enabled?


Does the Ubuntu package really ship with a link in /etc/apache2/conf.d ? I
would have expected one in /etc/apache2/sites-available, probably with a
VirtualHost section. That might be a matter of preference, but it might also
be a matter of order within the apache.conf. I'm not an apache expert, but I
would imagine order might be important for Directory and Alias statements. Of
course, if you put it in sites-available/, you'd need to a2ensite it ...

If you need more help, we'd probably need to know
- the BackupPC package version ('apt-cache policy backuppc' or
  'dpkg -l backuppc')
- what's in /etc/apache2/sites-enabled and /etc/apache2/mods-enabled
- what's in /usr/share/backuppc/cgi-bin ('ls -al ...')
- 'df -T /var/lib/backuppc' (for good measure ;-)
- are there any hints in /usr/share/doc/backuppc (e.g. README.Debian, or is it
  README.Ubuntu in Ubuntu? ;-)?
- is the cgi module enabled?

Hope some of that helps.

Regards,
Holger

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
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/