On 11/16/21 22:10, Claude Gelinas wrote:
Hi,

My setup for backuppc is like this since many years
backuppc 3.3.0
user backuppc
group backuppc
and it was working perfectly since many years with /var/lib/BackupPC/
mounted via nfs on a Freenas server.
Claude,
I also had a working version 3.3 system that I upgraded to 4.4. The GUI would not work in 4.4 until I made the specific edits to

"/etc/httpd/conf.d/BackupPC.conf" as I posted previously. Also, the apache user has to have group 
permissions for all the .pl and .conf files I have indicated in "/etc/httpd/conf.d", 
"/etc/BackupPC , /etc/BackupPC/pc/" and top level folder ie. /etc/BackupPC. Please confirm this for 
me or anyone else on the mailing list who might step in to help. See below for my line item edit 
recommendations for your /etc/httpd/conf.d/BackupPC.conf.

JimK


My problem started with the update of the freenas server. I've updated
backuppc to version 4.4.0 but this didn't solve my problem:
504 gateway timeout

I'm still able to make backup of all my PC but the Backuppc guy didn't
work for machine states or any host viewing. This prevent me to make
restore if ever I have a problem with one PC.
Apache/httpd can't read files that it doesn't have group permission to see per above comment.


my /etc/httpd/conf.d/BackupPC.conf is as follow:
Insert the following line at the top of this conf file:
<DirectoryMatch /usr/(share|libexec)/BackupPC/>
# BackupPC requires valid authentication in order for the web interface
# to function properly.  One can view the web interface without
# authentication though all functionality is disabled.
#
# htpasswd -c /etc/BackupPC/apache.users yourusername
#
AuthType Basic
AuthUserFile /etc/BackupPC/apache.users
AuthName "BackupPC"

<IfModule mod_authz_core.c>
# Apache 2.4
   <RequireAll>
    Require valid-user
    <RequireAny>
comment out or delete the line "Require local"
    Require local

Require all granted
    </RequireAny>
  </RequireAll>
</IfModule>


<IfModule !mod_authz_core.c>
   # Apache 2.2
comment out or delete the line "AllowOverride All"
   AllowOverride All

   order allow,deny
   deny from all
insert the following two lines:

allow from 127.0.0.1 192.168.xx.xx

require valid-user
</IfModule>
Per version 4.4 the line </Directory> is now </DirectoryMatch>
</Directory>

Alias         /BackupPC/images       /usr/share/BackupPC/html/
ScriptAlias   /BackupPC             /usr/share/BackupPC/sbin/BackupPC_Admin
ScriptAlias   /backuppc             /usr/share/BackupPC/sbin/BackupPC_Admin
Alias           /BackupPC/html/          /usr/share/BackupPC/html/
Delete everything below it is in conflict with above.
<Directory       /usr/share/BackupPC/html/>

<IfModule mod_authz_core.c>

# Apache 2.4

   <RequireAll>

     Require all granted
     <RequireAny>
     Require valid-user
     </RequireAny>
   </RequireAll>
</IfModule>


<IfModule !mod_authz_core.c>
   # Apache 2.2

order allow,deny
deny from all
allow from 127.0.0.1 192.168.xx.xx
AuthType Basic
AuthUserFile /etc/BackupPC/apache.users
AuthName "BackupPC"
require valid-user
</IfModule>
</Directory>

Could it be because it is set for apache 2.2 instead of apache 2.4 ?

Thank you
-------------------------

Le Mon, 15 Nov 2021 09:09:20 -0500
jbk<j...@kjkelra.com>  a écrit:

On 11/14/21 17:22, Claude Gelinas wrote:
I've updated BKP to 4.4.0 but I still get the same 504 gateway error
when I try to access the host summary in the GUY. Same if I try to
see backup from any host. Other items in the left side menu are
working.
The owner/group shown below are correct
/var/lib/Backuppc is NFS mounted from my freenas and I can see there
all pc and backup. File permission/ owner are as follow

drwxr-x---. 146 backuppc backuppc 146 14 nov 17:16 cpool
drwx------.   2 backuppc backuppc   2  1 déc  2007 lost+found
drwxr-x---.  20 backuppc backuppc  20 14 nov 16:32 pc
drwxr-x---.   2 backuppc backuppc   2 22 jan  2012 pool
drwxr-x---.   2 backuppc backuppc   2 14 nov 03:11 trash

Look like backup are still done but I can't see host summary or any
pc backup

Backuppc state on the guy say:
   Le PID du serveur est 32620, sur l'hôte localhost, version 4.4.0,
   démarré le 14/11 16:32. Ce rapport a été généré le 14/11 17:07.
   La configuration a été chargée pour la dernière fois à 14/11
16:32. La prochaine file d'attente sera remplie à 14/11 18:00.

Any idea of what is wrong ?
It appears that apache/httpd is not set up correctly. On my
system the httpd user is apache and a listing of
/etc/BackupPC/ shows that the config.pl files need to have
apache as the group
/# ll /etc/BackupPC/
total 388
-rw-r--r-- 1 backuppc apache      84 Sep  9 12:58 apache.users
drwxr-x--- 2 backuppc backuppc  4096 Nov 25  2011 bin
-rw-r--r-- 1 backuppc apache   86823 Sep 11 17:59 config.pl
-rw-r--r-- 1 backuppc apache   86823 Sep 11 17:57 config.pl.old
-rw-r--r-- 1 backuppc apache   88110 Sep  8 17:51
config.pl.testr8
-rw-r--r-- 1 backuppc apache   88378 Jun 22  2020
config.pl.testr8~
drwxr-xr-x 2 root     root      4096 Sep  9 09:34 distorig
-rw-r--r-- 1 backuppc apache    2279 Sep 11 17:59 hosts
-rw-r--r-- 1 backuppc apache    2246 Sep  9 09:46 hosts~
-rw-r--r-- 1 backuppc apache    2263 Sep 11 17:57 hosts.old
-rw-r--r-- 1 root     root      2246 Sep  9 09:46 hosts.test
-rw-r--r-- 1 root     root      2247 Sep  9 09:40 hosts.test~
-rw-r----- 1 backuppc backuppc     0 Nov 15 03:00 LOCK
drwxr-xr-x 3 backuppc apache    4096 Sep 11 18:00 pc

/Also in /etc/httpd/conf.d

/# ll /etc/httpd/conf.d
total 32
-rw-r--r-- 1 root     root   2926 Oct 12 22:30 autoindex.conf
-rw-r--r-- 1 backuppc apache  979 Sep 10 10:21 BackupPC.conf
-rw-r--r-- 1 backuppc apache  954 Sep  9 14:04 BackupPC.conf~
-rw-r--r-- 1 backuppc apache 1713 Jul 14 05:36 perl.conf
-rw-r--r-- 1 root     root    400 Oct 12 22:30 README
-rw-r--r-- 1 root     root   1252 Oct 12 22:28 userdir.conf
-rw-r--r-- 1 root     root    574 Oct 12 22:28 welcome.conf
-rw-r--r-- 1 root     root    574 Jun 11 11:33
welcome.conf.disable

/This is the contents of /etc/httpd/conf.d/BackupPC.conf

/# BackupPC requires valid authentication in order for the
web interface to
# function properly.  One can view the web interface without
authentication
# though all functionality is disabled.
#
# htpasswd -c /etc/BackupPC/apache.users yourusername
#

AuthType Basic
AuthUserFile /etc/BackupPC/apache.users
AuthName "BackupPC"

<IfModule mod_authz_core.c>
    # Apache 2.4
    <RequireAll>
      Require valid-user
      <RequireAny>
#      Require local
      Require all granted
      </RequireAny>
    </RequireAll>
</IfModule>
<IfModule !mod_authz_core.c>
    # Apache 2.2
    order deny,allow
    deny from all
    allow from 127.0.0.1 localhost 10.251.227
    allow from ::1
    require valid-user
</IfModule>

</DirectoryMatch>


Alias           /BackupPC/images
/usr/share/BackupPC/html/
ScriptAlias     /BackupPC /usr/libexec/BackupPC/BackupPC_Admin
ScriptAlias     /backuppc /usr/libexec/BackupPC/BackupPC_Admin
~

/This is on a Rockylinux machine.
/////
/





_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

Reply via email to