BackupPC-users

Re: [BackupPC-users] Non standard installation... failed (resend)

2016-03-18 11:32:45
Subject: Re: [BackupPC-users] Non standard installation... failed (resend)
From: Mauro Condarelli <mc5686 AT mclink DOT it>
To: backuppc-users AT lists.sourceforge DOT net
Date: Fri, 18 Mar 2016 16:30:34 +0100
Thanks Dan,
I am using suexec to run the CGI scripts as user backuppc.
Here follows my backuppc.conf:

<VirtualHost *:47180>
        ServerAdmin webmaster@localhost
        DocumentRoot /opt/backuppc/BackupPC

        LogLevel trace1

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        Alias /images /opt/backuppc/BackupPC/images
        <Directory "/opt/backuppc/BackupPC/images">
                Require all granted
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        Alias /cgi-bin/ /opt/backuppc/BackupPC/cgi-bin/
        SuexecUserGroup backuppc users
        <Directory "/opt/backuppc/BackupPC/cgi-bin">
                Options +ExecCGI
                SetHandler cgi-script
                AuthType Basic
                AuthName "Authentication Required"
                AuthUserFile /opt/backuppc/BackupPC/.htpasswd
                Require valid-user
                Order deny,allow
        </Directory>

</VirtualHost>

Problem *might* be only BackupPC_Admin script is in suexec documentroot.
I was under assumption all other scripts were actually called by BacupPC_Admin, is it so?
If not, what are the scripts that must be suid-backuppc?

In any cases: setting DATADIR as world-readable does *not* cure the problem.

TiA
Mauro

Il 18/03/2016 15:50, Dan Pritts ha scritto:
probably the web server doesn't have the right permissions.  see what user each is running under.  For simplest case, just make them both run under the same user id.  However, depending on what else you have running, that might or might not be right for you.
March 18, 2016 at 6:05 AM
As said (see below) I managed to get an apparently working installation.
I sat up a test backup on localhost and manually started a backup.
Apparently everything was ok:
2016-03-18 09:44:29 full backup started for directory /volume1/homes
2016-03-18 10:27:23 full backup 0 complete, 704991 files, 26858441879 bytes, 2019784 xferErrs (0 bad files, 0 bad shares, 2019784 other)
but the backup doesn't show up in "localhost HOME":
Host localhost Backup Summary
This PC has never been backed up!!

Apparently the datadir has been populated with something making sense
.../data/pc/localhost/0 exists and contains a subdir "f%2fvolume1%2fhomes" which is consistent with
the requested RsyncShareName(/volume1/homes).

The WEB GUI seems however unable to see this backup.

Nothe that, in order to test, I changed just the bare minimum: added host and then XferMethod, RsyncShareName and RsyncClientPath (the
latter because rsync is in a non-standard location on client)

What should I check?

Thanks in Advance
Mauro


Il 18/03/2016 03:07, Mauro Condarelli ha scritto:

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
March 17, 2016 at 10:07 PM
Thanks Dan,
after fiddling a bit with strace (available as option on my synology) I found the problem.

Problem is I installed with "--no-fhs" and in this condition install process (configure.pl) and Lib.pm completely disregard whatever I define as confdir and force it to be "$topDir/conf" (see: Lib.pm#126).
I see this as a bug.
Same behavior seems present in LogDir definition (next line).

Did I miss something?
What is the right way to report such bugs? (if this indeed is a bug).

Thanks
Mauro


Il 17/03/2016 17:54, Dan Pritts ha scritto:

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
March 17, 2016 at 12:54 PM
if your synology has strace, try

strace -e trace=file -o /tmp/trace.out /blah/blah/blah/BackupPC -d

that will show you all file access attempts by the script.  Alternately, search through the installed source to see where it is looking for config.pl.

This seems unlikely, but also check for selinux failures. 

both strace & selinux presume your synology is running  linux - if not, well, those won't work.


March 17, 2016 at 12:44 PM
Thanks Dan,
I have a config.pl:
    backuppc@syno0:~/BackupPC/conf$ ls -la
  total 96
 drwxr-x--- 2 backuppc users  4096 Mar 13 12:31 .
 drwxr-xr-x 9 backuppc users  4096 Mar 13 12:39 ..
 -rw-r----- 1 backuppc users 85652 Mar 13 12:31 config.pl
 -rw-r--r-- 1 backuppc users  2214 Mar 13 12:31 hosts
athough I did not (yet) configure it in any way (I plan to do it from the web IF) it already contains the
    $Conf{Language} = 'en';
line.

My guess is BackupPC is unable to find (or read) config.pl, but I can't understand why.
What should I check?

Any pointer welcome.

Regards
Mauro


Il 17/03/2016 17:15, Dan Pritts ha scritto:

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
March 17, 2016 at 12:15 PM
I know nothing about a synology nas, but i found this in the source:

    Lib.pm:    return "No language setting" if ( !defined($bpc->{Conf}{Language}) );

My config.pl file has

    $Conf{Language} = 'en';


I wonder if you aren't getting a config.pl file at all, perhaps the source installation doesn't give you one, just an example with a different name that you are supposed to customize.

hope this helps.


--
Dan Pritts
ICPSR Computing & Network Services
University of Michigan
+1 (734) 615-9529



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140


_______________________________________________
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/

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
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/