BackupPC-users

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

2016-03-18 15:25:03
Subject: Re: [BackupPC-users] Non standard installation... failed (resend)
From: Dan Pritts <danno AT umich DOT edu>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 18 Mar 2016 14:52:44 -0400
Not sure about the suexec & what program needs what permissions.

Hmm.  if your http basic auth user name doesn't match a user name that is listed in the hosts file, you will not have access to the given host.

March 18, 2016 at 11:30 AM
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:

------------------------------------------------------------------------------
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 18, 2016 at 10:50 AM
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.



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