CGI interface does not work after installation

Bug #1835929 reported by Xander
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
backuppc
Fix Released
Unknown
backuppc (Ubuntu)
Triaged
Medium
Unassigned
Bionic
Triaged
High
Unassigned
Disco
Won't Fix
Undecided
Unassigned
Eoan
Won't Fix
Medium
Unassigned
Focal
Confirmed
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned

Bug Description

System Information:

Description: Ubuntu 18.04.2 LTS
Release: 18.04

Clean install, sudo apt update, sudo apt upgrade then sudo apt install backuppc

Package installed from ubuntu repository: Backuppc 3.3.1-4ubuntu1

After installing the package, navigating to http://<hostname>/backuppc prompts firefox to download the page instead of viewing it.

To rectify this I had to input the following two commands:

sudo a2disconf serve-cgi-bin
sudo service apache2 restart

This was also reported on the github page:
https://github.com/backuppc/backuppc/issues/276

Has this already been fixed?

Revision history for this message
Bryce Harrington (bryce) wrote :

$ lxc exec bionic-19-032-1 -- bash
$ uname -a
Linux bionic-19-032-1 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"

$ apt-get -y install backuppc
$ apt-get -y install lynx

### Reset password to 'password' or whatever
$ htpasswd /etc/backuppc/htpasswd backuppc

$ lynx bionic-19-032-1
This prompts for basic auth, entered:
  username: backuppc
  password: password

This then shows binary garbage, starting with "ELF>@@8 @@@@88 8@..."

Opening the lxc container's network in firefox also prompts for auth, and then displays a dialog:

-----------------------------
"You have chosen to open:

  which is: application/octet-stream (6.0 KB)
  from: http://nn.nnn.nn.nnn
Would you like to save this file?
-----------------------------

Then performing the suggested workaround:

$ a2disconf serve-cgi-bin
Conf serve-cgi-bin disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2
$ service apache2 restart

This brings up a BackupPC Server Status page.

In firefox, bringing up "http://10.208.83.246/backuppc/index.cgi?action=summary" then works as well.

Changed in backuppc (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

I reproduced similar behavior on eoan with the same steps.

Here's the warnings that displayed during the install on eoan:

  adduser: Warning: The home directory `/var/lib/backuppc' does not belong to the user you are currently creating.
  ...
  dpkg-statoverride: warning: deprecated --force option; use --force-all instead
  ...
  To activate the new configuration, you need to run:
    systemctl restart apache2
  Your MPM seems to be threaded. Selecting cgid instead of cgi.
  Enabling module cgid.

I did not do the `a2disconf serve-cgi-bin` step, only `systemctl restart apache2`, it came up ok in lynx.

Revision history for this message
Bryce Harrington (bryce) wrote :

Reviewing changes between the bionic and eoan versions, I notice they've changed the default access:

backuppc (3.3.2-1) unstable; urgency=low
  * debian/apache.conf:
    + Only grant access from localhost by default (as by default HTTPS is
      not enforced). Mention that in NEWS.Debian.

and access permissions on the cgi-bin directory:

-rules: install --mode=4750 index.cgi debian/backuppc/usr/lib/backuppc/cgi-bin
+rules: install --mode=755 index.cgi debian/backuppc/usr/lib/backuppc/cgi-bin

This may improve the situation a little, although the problem of the cgi script not getting handled as cgi remains. For security conditions, this would need to adhere to ubuntu's policy on enabling cgi-bin on installation.

Updating documentation is a good idea - suggestions would be welcomed.

tags: added: server-next
summary: - Web interface fails on ubuntu 18.04 LTS
+ CGI interface does not work after installation
Changed in backuppc (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → High
Changed in backuppc (Ubuntu Eoan):
importance: High → Medium
Changed in backuppc:
status: Unknown → New
tags: removed: server-next
Changed in backuppc:
status: New → Fix Released
Steve Langasek (vorlon)
Changed in backuppc (Ubuntu Disco):
status: New → Won't Fix
Revision history for this message
Brian Murray (brian-murray) wrote :

The Eoan Ermine has reached end of life, so this bug will not be fixed for that release

Changed in backuppc (Ubuntu Eoan):
status: Triaged → Won't Fix
Revision history for this message
David Torrey (dotj) wrote :

FWIW, I was able to reproduce this bug on 20.04.5 and 22.04.1 today as well as 18.04.6. Interestingly, the workaround (a2disconf and a restart of apache2) worked on bionic and jammy, but did not change the behavior of focal.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for testing it David. I added tasks for Focal and Jammy as well. This bug is in our backlog, it will be investigated once we have some time.

Changed in backuppc (Ubuntu Focal):
status: New → Confirmed
Changed in backuppc (Ubuntu Jammy):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.