[[ Настройка rsyncd на Ubuntu 14.04 ]]

Ubuntu

Настройка rsyncd на Ubuntu 14.04

rsyncd - rsynс daemon, позволяет предоставить доступ по протоколу rsync (порт 873)

Установка

По умолчанию уже установлен

apt-get install rsync

Настройка демона

Включение демона

/etc/default/rsync

RSYNC_ENABLE=true

Создать конфиг

/etc/rsyncd.conf

uid = nobody
gid = nogroup
use chroot = yes
max connections = 10
pid file = /var/run/rsyncd.pid
log file = /var/log/rsync.log

Это общий конфиг демона GLOBAL PARAMETERS

Запуск

/etc/init.d/rsync start

Настройка доступа (примеры)

Настройки доступа read only, для синхронизации файлов проекта с master сервера

/etc/rsyncd.conf

...

[master_path]
comment = TEST project for sync
path = /home/master_user/path
exclude = settings.py *.pyo *.pyc *.log
uid = master_user
gid = master_user
read only = yes
hosts allow = 192.168.0.12/32
hosts deny = *
list = no

Перезапуск

/etc/init.d/rsync restart

На клиенте

rsync -av --delete rsync://server_host/master_path/  /home/slave_user/path

Настройка файл помойки, с возможность только загружать файлы

/etc/rsyncd.conf

...


[master_path]
comment = TEST project for sync
path = /home/master_user/path
exclude = settings.py *.pyo *.pyc *.log
uid = master_user
gid = master_user
read only = yes
hosts allow = 192.168.0.12/32
hosts deny = *
list = no


man rsyncd.conf






Обсуждение

Ваш комментарий. Вики-синтаксис разрешён:
73 +1 =
 
howto/ubuntu/ubuntu14.04_rsyncd_install.txt · Последнее изменение: 2022/08/31 14:53 — 127.0.0.1
Gentoo Linux Gentoo Linux Driven by DokuWiki