处理Rsync同步服务的常见错误: access denied to logs from UNKNOWN

艺帆风顺 发布于 2025-04-03 33 次阅读


错误信息如下:

@ERROR: access denied to logs from UNKNOWN (192.168.1.52)
rsync error: error starting client-server protocol (code 5) at main.c(1656) [sender=3.1.2]

具体原因因为有两个网段都需要同步该文件夹内容,但没有在hosts allow 后面添加另一个IP段,不能分两行写

hosts allow = 192.168.1.0/24
改为
hosts allow = 192.168.1.0/24 192.168.2.0/24
重新启动rsync服务,问题解决
    [root@YLMS ~]# rsync --versionrsync version 3.1.2 protocol version 31Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.Web site: http://rsync.samba.org/Capabilities: 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints, socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append, ACLs, xattrs, iconv, symtimes, prealloc
    rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and youare welcome to redistribute it under certain conditions. See the GNUGeneral Public Licence for details.

    反复检查服务器端和客户端都没有问题,则需要:

    添加 hosts allow = IP网段

        hosts allow = 0.0.0.0/0

      版权声明:本文内容来自CSDN:IT_狂奔者,遵循CC 4.0 BY-SA版权协议上原文接及本声明。本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行可。原文链接:https://blog.csdn.net/chj_1224365967/article/details/127555094如有涉及到侵权,请联系,将立即予以删除处理。在此特别鸣谢原作者的创作。此篇文章的所有版权归原作者所有,与本公众号无关,商业转载建议请联系原作者,非商业转载请注明出处。