Fetching BackUp Files via rsync from mailinabox / Permission Problem

Hello, I would like to fetch the BackUp Files from my Mail-in-a-Box Server to my Synology.
I cannot use the rsync from Mail-in-a-Box because my Synology is not reachable from the outside.

So I setup a rsync script on my Synology (based on this tutorial)
http://raphael.kallensee.name/journal/how-to-backup-an-external-server-with-a-synology-nas-via-rsync/

My script looks like that
#!/bin/bash

USER="mailinabox-user"
SERVER="server-ip"
PORT="22"
SSHID="/volume1/BackUp_BG11/02_mailserver-backup/01_KEY/mailinabox.key"
SOURCE="/home/user-data/backup/encrypted/"
TARGET="/volume1/BackUp_BG11/02_mailserver-backup/03_BACKUPS/"
LOG="/volume1/BackUp_BG11/02_mailserver-backup/02_LOGS/backup.log"

/bin/rsync -avz --delete --progress -e "ssh -p $PORT -i $SSHID" $USER@$SERVER:$SOURCE $TARGET >> $LOG 2>&1

I can connect to my mailinabox server but I cant copy any file. My log always says “permission denied”
I checked the permissions of the files in encrypted and the are all rw only for root

So my question is, how can I do this because it obviously makes no sense to change the owner or permission of the files => since it will be changed back to root again.
Also, I have added security on my server, which doesnt permit login as root user so I always login with an different mailinabox-user which i added to the sudo group.

Additional Info:
Part from the Log File:
receiving incremental file list
rsync: send_files failed to open “/home/user-data/backup/encrypted/duplicity-full-signatures.20200828T013503Z.sigtar.gpg”: Permission denied (13)
rsync: send_files failed to open “/home/user-data/backup/encrypted/duplicity-full.20200828T013503Z.manifest.gpg”: Permission denied (13)
rsync: send_files failed to open “/home/user-data/backup/encrypted/duplicity-full.20200828T013503Z.vol1.difftar.gpg”: Permission denied (13)
rsync: send_files failed to open “/home/user-data/backup/encrypted/duplicity-full.20200828T013503Z.vol2.difftar.gpg”: Permission denied (13)
rsync: send_files failed to open “/home/user-data/backup/encrypted/duplicity-inc.20200828T013503Z.to.20200829T013504Z.manifest.gpg”: Permission denied (13)
rsync: send_files failed to open “/home/user-data/backup/encrypted/duplicity-inc.20200828T013503Z.to.20200829T013504Z.vol1.difftar.gpg”: Permission denied (13)
rsync: send_files failed to open “/home/user-data/backup/encrypted/duplicity-inc.20200829T013504Z.to.20200830T013503Z.manifest.gpg”: Permission denied (13)

On your MiaB, set a password for the user user-data.

Rsync using that username to connect with.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.