BackupPC-users

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

2014-03-25 16:46:19
Subject: Re: [BackupPC-users] No web interface in new Ubuntu installation
From: Magnus Larsson <magnus AT vista DOT se>
To: Holger Parplies <wbppc AT parplies DOT de>
Date: Tue, 25 Mar 2014 21:18:19 +0100
Hi!

Sorry for delay, here are some more details:

the /usr/share/backuppc/cgi-bin directory:

$ ls -l
totalt 0
lrwxrwxrwx 1 backuppc backuppc  8 jan  9  2013 image -> ../image
lrwxrwxrwx 1 backuppc backuppc 39 jan  9  2013 index.cgi -> ../../../lib/backuppc/cgi-bin/index.cgi


Backuppc version (dpkg -l backuppc): 3.2.1-4ubuntu1

In /etc/apache2:
$ ls -l sites-enabled
totalt 12
lrwxrwxrwx 1 root root   35 mar 19 21:51 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root   31 mar 19 22:37 mythweb.conf -> ../sites-available/mythweb.conf
-rw-r--r-- 1 root root 9741 mar 19 22:25 mythweb.conf~

$ ls -l mods-enabled
totalt 0
lrwxrwxrwx 1 root root 36 mar 19 21:51 access_compat.load -> ../mods-available/access_compat.load
lrwxrwxrwx 1 root root 28 mar 19 21:51 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root 28 mar 19 21:51 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root 33 mar 19 21:51 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 mar 19 21:51 authn_core.load -> ../mods-available/authn_core.load
lrwxrwxrwx 1 root root 33 mar 19 21:51 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root 33 mar 19 21:51 authz_core.load -> ../mods-available/authz_core.load
lrwxrwxrwx 1 root root 38 mar 19 21:52 authz_groupfile.load -> ../mods-available/authz_groupfile.load
lrwxrwxrwx 1 root root 33 mar 19 21:51 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 mar 19 21:51 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 mar 19 21:51 autoindex.conf -> ../mods-available/autoindex.conf
lrwxrwxrwx 1 root root 32 mar 19 21:51 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root 27 mar 19 21:52 cgid.conf -> ../mods-available/cgid.conf
lrwxrwxrwx 1 root root 27 mar 19 21:52 cgid.load -> ../mods-available/cgid.load
lrwxrwxrwx 1 root root 26 mar 25 21:05 cgi.load -> ../mods-available/cgi.load
lrwxrwxrwx 1 root root 30 mar 19 21:51 deflate.conf -> ../mods-available/deflate.conf
lrwxrwxrwx 1 root root 30 mar 19 21:51 deflate.load -> ../mods-available/deflate.load
lrwxrwxrwx 1 root root 26 mar 19 21:51 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root 26 mar 19 21:51 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root 26 mar 19 21:51 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root 29 mar 19 21:51 filter.load -> ../mods-available/filter.load
lrwxrwxrwx 1 root root 27 mar 19 21:51 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root 27 mar 19 21:51 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root 34 mar 21 19:53 mpm_prefork.conf -> ../mods-available/mpm_prefork.conf
lrwxrwxrwx 1 root root 34 mar 21 19:53 mpm_prefork.load -> ../mods-available/mpm_prefork.load
lrwxrwxrwx 1 root root 34 mar 19 21:51 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 mar 19 21:51 negotiation.load -> ../mods-available/negotiation.load
lrwxrwxrwx 1 root root 27 mar 21 19:53 php5.conf -> ../mods-available/php5.conf
lrwxrwxrwx 1 root root 27 mar 21 19:53 php5.load -> ../mods-available/php5.load
lrwxrwxrwx 1 root root 30 mar 19 22:21 rewrite.load -> ../mods-available/rewrite.load
lrwxrwxrwx 1 root root 31 mar 19 21:51 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 mar 19 21:51 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root 29 mar 19 21:51 status.conf -> ../mods-available/status.conf
lrwxrwxrwx 1 root root 29 mar 19 21:51 status.load -> ../mods-available/status.load



$ df -T /var/lib/backuppc
Filsystem      Typ    1K-block    Använt Tillgängligt Anv% Monterat på
/dev/md126p1   ext4 1922600660 591335028   1233580084  33% /var/lib/backuppc

Cgi-module in apache is enabled according to:
$ sudo a2enmod cgi
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Module cgi already enabled



Does this help?


Magnus



2014-03-19 23:13, Holger Parplies skrev:
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 tls -l
totalt 0
lrwxrwxrwx 1 backuppc backuppc  8 jan  9  2013 image -> ../image
lrwxrwxrwx 1 backuppc backuppc 39 jan  9  2013 index.cgi -> ../../../lib/backuppc/cgi-bin/index.cgi
hree 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/