rsync daemon 同步数据时,若想同时指定权限和属主属组,可以做如下配置:
[test1]
uid = admin
gid = admin
incoming chmod = Dug=rwx,Do=rx,Fug=rw,Fo=r
outgoing chmod = Du=rwx,Dog=x,Fg=rw,Fog=r
path = /data/backup/test1
hosts allow = 127.0.0.1
auth users = rsy_user
read only = no
该配置可以保证,推向rsync daemon端的文件目录为:admin:admin 775 664
从rsync daemon端拉取的文件目录为: 711 644