rsyncd.conf配置项说明

首先,给出版本信息
rsync version 3.1.2 protocol version 31

#指定deamon端IP ,一个deamon端可能有多个IP
address = 172.16.1.41 
list = false
max connections = 4
pid file = /var/run/rsyncd.pid
exclude = lost+found/
transfer logging = yes
timeout = 600
# ignore nonreadable = yes
dont compress  = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2

#uid&gid指的是当deamon端在服务端读写文件时使用的id.
#使用非root身份,在服务端会造成某些一些权限问题,比如软连接文件变为普通文件,无法保留文件属主数组
uid = root
gid = root
#会将path定义为根目录,
#所以../XXX这样的软连接会变成XXX,因为当前目录(path)已经是根了,不可能存在父级目录
#/XXX这样的软连接会变成XXX,因为当前目录(path)就是根目录
#这样可以增加安全性
use chroot = true
#A chroot-enabled module should not have this parameter enabled unless...
numeric ids = false
#即使在uid为root的情况下,fake super给成true也会丢失文件属主、属组。所以这里给成no
fake super = false
#会在软链接路径前,添加这样的字符串/rsyncd-munged/,
#这种安全策略和use chroot = yes会冲突,使得use chroot对链接地址的修改失效。所以,这里给成false
munge symlinks = false
secrets file = /etc/rsync_web.password
strict modes = true

[web]
#为什么不是/var/XXX?因为要配合use chroot = yes ,如果这里为/var/XXX,根依然为/
path = /var/./XXX
#这样,会同时使用/var/log/message和/var/log/rsync_web
log file = /var/log/rsync_web
comment = web服务器备份模块
read only = false
auth users = rsync_web
hosts allow = 172.16.1.7
    原文作者:qq_412445773
    原文地址: https://www.jianshu.com/p/225e89ce0264
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞