[SOLVED]RSYNC over SSH problem

[SOLVED]RSYNC over SSH problem

Postby mackowiakp » Mar 16th, '16, 14:32

I want to rsync content from Synology to rsync server on my M5 server.

The command I use on Synology is:

Code: Select all
rsync -vratx -e "ssh -p666" --delete /volume1/homes/user15 lamia@example.ddns.net:LAMIA


The LAMIA entry in rsyncd.conf file is:

Code: Select all
uid=root
gid=root
use chroot = no
secrets file = /etc/rsyncd.secrets

[LAMIA]
comment = "Pliki z LAMIA"
path = /home/lamia/LAMIA
read only = no
auth users = lamia
dont compress = *.mp3 *.cab *.gz *.avi *.vob *.mpg *.jpg *.zip *.bz2 *.iso *.rpm
hosts allow = aaa.bbb.ccc.ddd


And files are properly rsync`ed except one problem. uid, gid and mods are not properly rsync`ed. That is, all files have owner/group lamia/lamia and files and subdirs mods are set to 711.

What I am doing wrong? Anu idea?
Last edited by mackowiakp on Sep 3rd, '16, 07:49, edited 1 time in total.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 646
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: RSYNC over SSH problem

Postby doktor5000 » Mar 16th, '16, 20:02

Do you run the rsync as root?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: RSYNC over SSH problem

Postby mackowiakp » Mar 16th, '16, 20:46

Yes, on M5 as service daemon and as root on Synology
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 646
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: RSYNC over SSH problem

Postby mackowiakp » Mar 17th, '16, 15:31

I think that something is wrong with rsync implementation on Synology. When I rsync between M5 and Fedora based computers, everything is OK.

The solution is below, but it need to access to root by Synology. And it is not good from my point of view

1 - Command executed on Synology:

Code: Select all
rsync -vratx --exclude-from=/volume1/@skrypty/pomin.txt -e "ssh -p666" --delete /volume1 root@example.ddns.net:LAMIA


Notice that there is ONE colon before LAMIA

2 - entry in rsyncd.conf

Code: Select all
uid=root
gid=root
use chroot = no
secrets file = /etc/rsyncd.secrets

[LAMIA]
comment = "Pliki z LAMIA"
path = /home/media/disk-2/LAMIA
read only = no
auth users = root
dont compress = *.mp3 *.cab *.gz *.avi *.vob *.mpg *.jpg *.zip *.bz2 *.iso *.rpm
hosts allow = IP_address_of_Synology


3 - entry in sshd.config

Code: Select all
AllowUsers root@IP_address_of_Synology root


4 - I had to link /home/media/disk-2/LAMIA dir inside /root dir

Thats kind of workaround. Maybe anybody will have better propositions. Will be gald !
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 646
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron