A
A
AlexeyMish2018-03-14 13:35:52
rsync
AlexeyMish, 2018-03-14 13:35:52

How to set permissions for rsync?

Please help, I don't understand what I'm doing wrong.
It seems that the error is not worth a damn, but I can not decide the second day.
Config
cat /etc/rsyncd.conf

spoiler
max connections = 10
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2 *.rar *.7z *.mp3 *.jpg
[src]
path = /mnt/rsync_test_data
comment = Public folders
uid = root
read only = yes
list = yes
# auth users = rsync_src,rsync_dst, backup,1, vishnivetsky.ru
# secrets file = /etc/rsyncd.scrt
hosts allow = * # localhost
hosts deny = 8.8.8.8

When trying to see the contents of
rsync 127.0.0.1::src
rsync: opendir "/." (in src) failed: Permission denied (13)
drwxrwxrwx 58 2018/03/07 07:43:00 .
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1518) [generator=3.0.9]
What does it lack rights to?
spoiler
ls -l /mnt/
total 0
drwxrwxrwx. 2 root root 58 Mar 7 07:43 rsync_test_data
ls -l /mnt/rsync_test_data
total 0
-rwxrw-rw-. 1 root root 0 Mar 7 07:42 1.txt
-rwxrw-rw-. 1 root root 0 Mar 7 07:42 2.txt
-rwxrw-rw-. 1 root root 0 Mar 7 07:42 3.txt
-rwxrw-rw-. 1 root root 0 Mar 7 07:43 4.txt

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Chernykh, 2018-03-14
@sashkets

and if so ?
rsync [email protected]::src

A
AlexeyMish, 2018-03-14
@AlexeyMish

Found a solution.
the problem is in SELinux, disable it and everything is ok.
Difficult way, put
yum install setroubleshoot-server
Bring the log into a digestible form
sealert -a /var/log/audit/audit.log > /home/vishnivetsky.ru/audit.txt
Follow the recommendations from there.
Now the truth is faced with another problem on a neighboring server,

spoiler
max connections = 10
exclude = lost+found/
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2 *.rar *.7z *.mp3 *.jpg
[dst]
path = /mnt/rsync_dst_test_data #/mnt/dtco-rsync-dst/
comment = Private folders
uid = root
read only = yes
list = yes
# auth users = rsync_src,rsync_dst, backup
# secrets file = /etc/rsyncd.scrt
hosts allow = localhost 35.190.198.26
hosts deny = 8.8.8.8

rsync 127.0.0.1::dst
@ERROR: chroot failed rsync error: error starting client-server protocol (code 5) at main.c(1516) [ Receiver
=3.0.9]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question