I had started another thread about my crashed backuppc server, and am working
on G.W. Haywood's excellent instructions on recovering files from the external
drive.
I had to first set up a new machine. The machine that crashed was a raspberry
pi (with a nvme instead of an SD card - still crashed), so I am ditching that
and went with a miniPC. I installed a flavor of ubuntu.
All previous times I have installed backuppc it worked out of the box. But
this 26.04 LTS package seems broken, but I am trying to fix it. First issue
was CGI scripts not running (binary file downloaded).
Was getting in my apache2 log (note, my hyphens are just there to delineate the
file content, not part of the content):
---
client 192.168.0.84:59892] AH01630: client denied by server configuration:
/usr/share/backuppc/cgi-bin/
---
but I fixed that (after searching) by adding:
---
<Directory "/var/www/html/cgi-bin">
Options +ExecCGI
AddHandler cgi-script .cgi .pl .bin
Require all granted
</Directory>
---
to /etc/apache2/sites-available/000-default.conf
My /etc/apache2/conf-enabled/backuppc.conf file is:
---
Alias /backuppc /usr/share/backuppc/cgi-bin/
<Directory /usr/share/backuppc/cgi-bin/>
AllowOverride None
# Uncomment the line below to ensure that nobody can sniff important
# info from network traffic during editing of the BackupPC config or
# when browsing/restoring backups.
# Requires that you have your webserver set up for SSL (https) access.
#SSLRequireSSL
Options ExecCGI FollowSymlinks
AddHandler cgi-script .cgi
DirectoryIndex index.cgi
AuthUserFile /etc/backuppc/htpasswd
AuthType basic
AuthName "BackupPC admin"
<RequireAll>
# Comment out this line once you have setup HTTPS and
uncommented SSLRequireSSL
# Require local
# This line ensures that only authenticated users may access
your backups
Require valid-user
</RequireAll>
</Directory>
---
After restarting apache2 I got the CGI interface working and no longer had
errors written to the apache2 log.
But now the CGI interface can't write config files, getting "TextFileWrite:
Failed to write /etc/backuppc/localhost.pl.new" when I try to save changes
I looked at the permissions in /etc/backuppc and saw:
---
/etc/backuppc$ ls -la
total 212
drwxr-xr-x 2 backuppc www-data 4096 May 8 10:54 .
drwxr-xr-x 141 root root 12288 May 8 11:30 ..
-rw-r----- 1 backuppc backuppc 0 May 9 10:03 LOCK
-rw-r--r-- 1 backuppc www-data 835 May 8 12:00 apache.conf
-rw-r--r-- 1 backuppc www-data 88554 Feb 2 15:19 config.pl
-rw-r--r-- 1 backuppc www-data 88392 Feb 2 15:19 config.pl.sample
-rw-r--r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts
-rw-r--r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts.sample
-rw-r----- 1 backuppc www-data 47 May 8 10:54 htpasswd
-rw-r--r-- 1 backuppc www-data 427 Feb 2 15:19 localhost.pl
lrwxrwxrwx 1 root root 13 May 8 10:54 pc -> /etc/backuppc
---
I saw the apache user group (www-data) didn't have write access so I added
group write access to the directory and some files:
---
/etc/backuppc$ ls -la
total 212
drwxrwxr-x 2 backuppc www-data 4096 May 8 10:54 .
drwxr-xr-x 141 root root 12288 May 8 11:30 ..
-rw-r----- 1 backuppc backuppc 0 May 9 10:03 LOCK
-rw-r--r-- 1 backuppc www-data 835 May 8 12:00 apache.conf
-rw-rw-r-- 1 backuppc www-data 88554 Feb 2 15:19 config.pl
-rw-r--r-- 1 backuppc www-data 88392 Feb 2 15:19 config.pl.sample
-rw-rw-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts
-rw-r--r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts.sample
-rw-r----- 1 backuppc www-data 47 May 8 10:54 htpasswd
-rw-rw-r-- 1 backuppc www-data 427 Feb 2 15:19 localhost.pl
lrwxrwxrwx 1 root root 13 May 8 10:54 pc -> /etc/backuppc
---
But still isn't working.
Apache is running as www-data (user and group):
---
$ apachectl -S
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
VirtualHost configuration:
*:80 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/run/apache2/" mechanism=default
Mutex watchdog-callback: using_defaults
PidFile: "/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
---
Any suggestions? Maybe whatever I did to get the CGI interface working wasn't
enough to get it working with the correct permissions?
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/