【发布时间】:2018-09-05 04:02:34
【问题描述】:
问题
我对@987654321@ 守护进程和权限感到困惑。不幸的是,我不知道为什么我得到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.conf 的manpage,我无法解决这个问题。
设置
这是我的/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/data 由具有 755 权限的 root 拥有(尽管随机的 user 或 syncuser 也不起作用)。
此外,/etc/rsyncd.secrets 拥有600 权限并且归root 所有(我也试过400 虽然同样的问题)
syncuser:passwd
启动服务(在 CentOS7 上)
sudo systemctl start rsyncd
在运行守护程序的主机上作为随机user 进行第一次测试(也使用sudo 或syncuser 运行无效)
rsync user@host::
返回share data说明配置没问题?!
然而
rsync user@host::share
导致上面提到的错误。
尝试
与/path/to/data 的chmod (777) 和chown (root:root, 随机user:user, syncuser:syncuser) 一起玩并没有改变任何东西。此外,我将uid 和gid 更改为nobody,但也没有成功。
在实际客户端上运行rsync 命令,我想最终从中复制数据到主机当然也失败了。
那么我在这里错过了什么?任何提示当然都非常感谢。
【问题讨论】:
标签: permissions daemon rsync