In BackupPC > Edit Config > Rsync Paths/Commands/Args do you have “sudo
/usr/bin/rsync” for RsyncClientPath?



Kind regards,

*Jamie*
--





*From:* John Cusick <jcus...@gmail.com>
*Sent:* Tuesday, April 16, 2024 8:09 AM
*To:* General list for user discussion, questions and support <
backuppc-users@lists.sourceforge.net>
*Subject:* Re: [BackupPC-users] Backup problems with /home directory



On Mon, Apr 15, 2024 at 8:44 PM Les Mikesell <lesmikes...@gmail.com> wrote:

On Mon, Apr 15, 2024 at 9:10 PM John Cusick <jcus...@gmail.com> wrote:
>
> I've searched multiple sites and everything I've tried just isn't working.
>
> I'm using rsyncd
>
> The systems I'm testing are both Fedora 39, one server and one laptop.
>
> I'm using the BackupPC on the server:
> BackupPC-XS-0.62-13.fc39.x86_64
> BackupPC-4.4.0-10.fc39.x86_64
>
> I named the backup user "backuppc" which has passwordless ssh login on
both the server and laptop client.
>
> the sudoers file has the following entry:
...

Are you sure you understand the difference between the rsync and
rsyncd methods?    Rsyncd expects a standalone rsync daemon listening
on the client and backs up 'shares' in the rsyncd.conf setup.   The
rsync method connects over ssh to the client and either needs to
connect as root on the client or have a more convoluted sudo
configuration to have permission to read everything.

-- Les Mikesell
     lesmikes...@gmail.com

Les, thanks for your reply.



I believe I do know the difference.



I'm using the rsyncd method although I tried the rsync method which I felt
was too convoluted to bother with, and it didn't work either.



In a work environment using BackupPC, version 2.x, and  3.x, I had set up a
system that successfully backed up terabytes of info for 11 or so clients
for years using rsyncd on the clients. The only difference I specifically
remember compared to today is that

the backuppc user 6+ years ago was set up with a service UID/GID number
(<1000 for UID/GID on RedHat/Fedora)



I've since retired but have been asked to come back and set up something
along the same lines, so I figured I had better "practice" on my home
systems first with the newer version of BackupPC. And, as I mentioned, the
server is successfully backing up the

/etc and /usr/local directories using rsync with the rsyncd daemon on the
client but will not back up either of the /home/user directories.



The setup for each directory on the client system is identical, for example:



-----

[local]

      comment = /usr/local directory
      path = /usr/local
      auth users = backuppc
      secrets file = /etc/rsyncd.secrets
      hosts allow = x.x.x.x

[user]

        comment = home directory
        path = /home/user
        auth users = backuppc
        secrets file = /etc/rsyncd.secrets

        hosts allow = x.x.x.x

-----

(I've changed the "user name")



/usr/local backs up with no unexpected errors. The user directories fail
with:

"rsync: [sender] change_dir "/" (in backuppc) failed: Permission denied
(13)"



The permissions of the user directories are identical to those I worked
with years ago, i.e., /home/user is drwx------

(This is required in this secured environment)



BackupPC version 3 had no problems entering these user directories using
rsync/rsyncd but for some reason this version gives the above error.



The reason I mention transferring the test file was to show that the "sudo
rsync" command for the backuppc user without password is working to copy a
file from one home directory to another home directory even with the
permissions set as they are.



I cannot figure out why this is happening after messing with it for hours
yesterday and today. Obviously I'm missing something and I'm assuming it
has something to do with the /home/user directory permissions but they must
remain as they are due to security issues required at the work site for the
last 10 years or so. It worked then but isn't working now and selinux,
enforcing, is giving no errors



One thing I've noticed is that rsync runs on the client system as user
nobody, so I'm assuming it's a permissions error, so I tried setting rsync
with the suid bit, but it changed  nothing..



I would have thought that the "sudo /usr/bin/rsync" would give the rsync
executable root level access but I guess not. Something has appeared to
have changed from 6 years ago and I'm not sure what it is.



(again, the sudoers file reads: "backuppc ALL= NOPASSWD:/usr/bin/rsync" )



Regards,



John C.



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