When I run /usr/libexec/BackupPC/BackupPC_Admin in a terminal as apache or
backuppc, I get the same html output which seems correct,
but when I browse to the address http://myserver.mydomain/backuppc, I still
get :
-----------------
Error: Wrong user: my userid is 48, instead of 955(backuppc)
This script needs to run as the user specified in $Conf{BackupPCUser},
which is set to backuppc.
This is an installation problem. If you are using mod_perl then it appears
that Apache is not running as user backuppc. If you are not using mod_perl,
then most like setuid is not working properly on BackupPC_Admin. Check the
permissions on /usr/libexec/BackupPC/BackupPC_Admin and look at the
documentation.
-----------------
$ su -s /bin/bash apache
or
$ su -s /bin/bash backuppc
$ /usr/libexec/BackupPC/BackupPC_Admin
Content-Type: text/html; charset=utf-8
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>BackupPC Server Status</title>
<link rel=stylesheet type="text/css"
href="/BackupPC/images/BackupPC_stnd.css" title="CSSFile">
<link rel=icon href="/BackupPC/images/favicon.ico" type="image/x-icon">
<meta http-equiv="pragma" content="no-cache">
<script src="/BackupPC/images/sorttable.js"></script>
</head><body
onLoad="document.getElementById('NavMenu').style.height=document.body.scrollHeight">
<div id="navigation-container">
<div id="logo-container">
<a href="https://backuppc.github.io/backuppc/"><img
src="/BackupPC/images/logo.gif"></a>
</div>
<div class="NavMenu" id="NavMenu">
<h2 class="NavTitle">Hosts</h2>
<select onChange="document.location=this.value">
<option value="#">Select a host...</option><option
value="?host=xxx">xxx</option>
</select>
<form action="" method="get">
<input type="text" name="host" size="14" maxlength="64">
<input type="hidden" name="action" value="hostInfo"><input
type="submit" value="Go" name="ignore">
</form>
<h2 class="NavTitle">Server</h2>
<a href="?action=status">Status</a>
<a href="?action=summary">Host Summary</a>
<a href="?action=editConfig">Edit Config</a>
<a href="?action=editConfig&newMenu=hosts">Edit Hosts</a>
<a href="?action=adminOpts">Admin Options</a>
<a href="?action=view&type=LOG">LOG file</a>
<a href="?action=LOGlist">Old LOGs</a>
<a href="?action=emailSummary">Email summary</a>
<a href="?action=queue">Current queues</a>
<a href="?action=view&type=docs">Documentation</a>
<a href="https://github.com/backuppc/backuppc/wiki">Wiki</a>
<a href="https://backuppc.github.io/backuppc">Github</a>
</div>
</div> <!-- end #navigation-container -->
<div id="Content">
<h1>BackupPC Server Status</h1>
<p>
<h2>Currently Running Jobs</h2>
<p>
<table class="tableStnd" border cellspacing="1" cellpadding="3">
<tr class="tableheader"><td> Host </td>
<td> Type </td>
<td> User </td>
<td> Start Time </td>
<td> Command </td>
<td align="center"> PID </td>
<td align="center"> Xfer PID </td>
<td align="center"> Status </td>
<td align="center"> Count </td>
</tr>
</table>
<p>
<h2>General Server Information</h2>
<ul>
<li> The servers PID is 27983, on host myserver.mydomain,
version 4.1.3, started at 12/13 17:04.
<li> This status was generated at 12/13 17:06.
<li> The configuration was last loaded at 12/13 17:04.
<li> PCs will be next queued at 12/13 18:00.
<li> Other info:
<ul>
<li>0 pending backup requests from last scheduled wakeup,
<li>0 pending user backup requests,
<li>0 pending command requests,
<li>Pool is 0.00GiB comprising 0 files
and 0 directories (as of 12/12 01:00),
<li>Pool hashing gives 0 repeated
files with longest chain 0,
<li>Nightly cleanup removed 0 files of
size 0.00GiB (around 12/12 01:00),
<li>Pool file system was recently at 38%
(12/13 17:02), today's max is 38% (12/12 01:00)
and yesterday's max was 38%.
</ul>
</ul>
<ul>
<ul>
<p><img src="?action=view&type=poolUsage&num=4">
<p><img src="?action=view&type=poolUsage&num=52">
</ul>
</ul>
<h2>Failures that need attention</h2>
<p>
<table class="tableStnd" border cellspacing="1" cellpadding="3">
<tr class="tableheader"><td align="center"> Host </td>
<td align="center"> Type </td>
<td align="center"> User </td>
<td align="center"> Last Try </td>
<td align="center"> Details </td>
<td align="center"> Error Time </td>
<td> Last error (other than no ping) </td></tr>
<tr><td class="border"> <a href="?host=xxx">xxx</a> </td>
<td align="center" class="border"> full </td>
<td align="center" class="border"> <a href="mailto:fujisan">fujisan</a>
</td>
<td align="right" class="border"> 12/13 17:00 </td>
<td class="border"> </td>
<td align="right" class="border"> 12/13 17:00 </td>
<td class="border"> No files dumped for share C$ </td></tr>
</table>
</body></html>
On Wed, Dec 13, 2017 at 11:03 AM, fujisan <fujisa...@gmail.com> wrote:
> Hi,
>
> I did a fresh reinstall of BackupPC and I have the following:
> I have installed BackupPC-4.1.3-4.fc27.x86_64 .
>
> -rw-r----- 1 backuppc apache 47 Dec 11 15:49 /etc/BackupPC/apache.users
> -rw-rw---- 1 apache apache 65536 Nov 25 12:27 /etc/httpd/alias/cert8.db
> -rw-rw---- 1 apache apache 16384 Nov 25 12:27 /etc/httpd/alias/key3.db
> -rw-rw---- 1 apache apache 20 Sep 11 2015
> /etc/httpd/alias/pwdfile.txt
> -rw-rw---- 1 apache apache 16384 Nov 25 12:20 /etc/httpd/alias/secmod.db
> -r-------- 1 apache apache 29 Sep 11 2015
> /etc/httpd/conf/password.conf
> drwxr-x--- 2 backuppc apache 4096 Dec 13 10:19 /usr/libexec/BackupPC/
> -rwsr-x--- 1 backuppc apache 7128 Aug 2 18:51 /usr/libexec/BackupPC/
> BackupPC_Admin
>
> in /etc/BackupPC/config.pl, i have
> $Conf{BackupPCUser} = 'backuppc';
>
> and I still have the error:
> >>Error: Wrong user: my userid is 48, instead of 955(backuppc)
> >>This script needs to run as the user specified in $Conf{BackupPCUser},
> which is set to backuppc.
> 48 is userid of apache.
>
> The script /usr/libexec/BackupPC/BackupPC_Admin is owned by user
> backuppc, so I don't understand the reasons for this error message.
>
> My web server is running Freeipa as well.
>
> Regards,
> Fuji
>
>
> On Wed, Dec 13, 2017 at 12:52 AM, Holger Parplies <wb...@parplies.de>
> wrote:
>
>> Hi,
>>
>> fujisan wrote on 2017-12-12 13:08:08 +0100 [Re: [BackupPC-users] Error:
>> Wrong user: my userid is 48, instead of 955(backuppc)]:
>> > [...]
>> > I have the following:
>> > -r-------- 1 backuppc apache 29 Sep 11 2015
>> /etc/httpd/conf/password.conf
>>
>> that would seem to be a problem (unrelated), because authentication is
>> probably done by Apache, not the BackupPC_Admin script ... ah ... it
>> appears it won't
>> be, if you've changed the user for Apache (which I wouldn't do).
>>
>> > -rwsr-x--- 1 backuppc apache 7128 Aug 2 18:51
>> /usr/libexec/BackupPC/BackupPC_Admin
>>
>> Well, and /usr/libexec/BackupPC?
>>
>> > in /etc/httpd/conf/httpd.conf
>> > User backuppc
>> > Group apache
>>
>> Presuming setuid is working for Perl scripts (which it may not), there
>> would
>> be no reason to change this. Even if setuid Perl scripts don't work, there
>> are probably better ways to do this. Is your web server running anything
>> else
>> besides BackupPC?
>>
>> Presuming you really *do* keep this, remove the setuid on BackupPC_Admin.
>>
>> > [...]
>> > On Tue, Dec 12, 2017 at 11:46 AM, Jamie Burchell <ja...@ib3.co.uk>
>> wrote:
>> > > You need to configure Apache (/etc/httpd/conf/httpd.conf on CentOS 7)
>> to
>> > > run under user ???backuppc???:
>>
>> Can't say I'd agree. Besides the obvious implications, that sort of puts
>> you
>> back on square one, where you might have to change all sorts of things on
>> your
>> system just to get Apache to run. Repeat on every security update of
>> Apache.
>> You'd better know what you're doing, in which case you wouldn't be here.
>>
>> It certainly is *a* possible solution, but it's neither elegant nor
>> mandatory,
>> nor should it be suggested without warning about the many implications.
>>
>> > [...]
>> > > -rwsr-x--- 1 apache apache 7128 Aug 2 18:51
>> /usr/libexec/BackupPC/BackupPC_Admin
>>
>> At this point, it was obvious, but you've figured that out. Did you
>> mention
>> whether the error message stayed the same after you changed that?
>>
>> > > I have changed the ownership of BackupPC_Admin to backuppc and the
>> > > permissions as well.:
>> > >
>> > > drwxr-xr-x 2 backuppc backuppc 4096 Dec 11 16:53
>> /usr/libexec/BackupPC/
>> > > -rwsr-x--- 1 backuppc backuppc 7128 Aug 2 18:51
>> /usr/libexec/BackupPC/
>> > > BackupPC_Admin
>> > >
>> > > And the log says:
>> > > [Tue Dec 12 10:50:58.607612 2017] [cgid:error] [pid 715:tid
>> > > 139944750074112] (13)Permission denied: AH01241: exec of
>> > > '/usr/libexec/BackupPC/BackupPC_Admin' failed
>>
>> Well, yes, that's still obvious, because Apache has no execute permission.
>>
>> > > Well, I cannot figure out how to setup backuppc.
>>
>> And I can't figure out how to stop people from top-posting.
>>
>> > > Any help welcome
>>
>> Same here.
>>
>> Regards,
>> Holger
>>
>> P.S.: If your distribution's BackupPC package doesn't work with your
>> distribution's Apache package and doesn't provide information on how
>> to fix that, you should probably file a bug report.
>>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/