rsync 守护进程和权限

rsync daemon and permissions

问题

我对 rsync 守护程序和权限感到困惑。不幸的是我不知道为什么我得到
rsync: opendir "/." (in share) failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [generator=3.1.2].
显然,通过搜索网络并查看 rsync / rsyncd.confmanpage,我无法解决这个问题。

设置

这是我的 /etc/rsyncd.conf 拥有者 root 拥有 644 权限:

log file = /var/log/rsyncd.log
[share]
     comment = data
     path = /path/to/data
     uid = root
     gid = root
     read only = false
     auth users = syncuser
     secrets file = /etc/rsyncd.secrets

注意,/path/to/dataroot 拥有,具有 755 权限(尽管随机 usersyncuser 也不起作用)。
此外,/etc/rsyncd.secrets 具有 600 权限并归 root 所有(我也尝试过 400 虽然同样的问题)

syncuser:passwd

启动服务(CentOS7)

sudo systemctl start rsyncd

作为随机 user 主机上的第一个测试 运行 守护程序,(也 运行 sudosyncuser 没有效果)

rsync user@host::

returns share data 显示配置没问题?!

然而

rsync user@host::share

导致出现上述错误

尝试

chmod (777) 和 chown (root:root, 随机 user:user, syncuser:syncuser) of /path/to/data 没有改变任何东西。此外,我将 uidgid 更改为 nobody 但也没有成功。
运行 在实际客户端上的 rsync 命令,我想从中最终将数据复制到主机当然也失败了。

那么我在这里缺少什么?任何提示当然非常感谢。

你能检查一下 SELinux 吗?

如果强制执行,目录 /path/to/data 需要正确标记。

例如, chcon -R -t public_content_t /path/to/data