当前位置: 首页> 娱乐> 八卦 > 开发公司质量安全科职责_莱芜雪野湖风景区_关键词seo排名怎么样_网络推广的公司是骗局吗

开发公司质量安全科职责_莱芜雪野湖风景区_关键词seo排名怎么样_网络推广的公司是骗局吗

时间:2025/7/11 14:10:52来源:https://blog.csdn.net/weixin_45754407/article/details/145855149 浏览次数:0次
开发公司质量安全科职责_莱芜雪野湖风景区_关键词seo排名怎么样_网络推广的公司是骗局吗

银河麒麟高级服务器操作系统通用rsync禁止匿名访问操作指南

      • 一 系统环境
      • 二、基础信息
        • 2.1 IP信息
        • 2.2 两台机器分别执行关闭firewalld或者放行相关的端口
      • 三、服务端配置
        • 3.1 配置rsync.conf文件
        • 3.2 创建密码文件
        • 3.3 重启rsyncd 服务
      • 四、客户端测试
        • 4.1 allowed_user1和allowed_user2用户测试
        • 4.2 其他用户测试

一 系统环境

#本文采用V10SP2进行演示

[root@localhost ~]# nkvers
############## Kylin Linux Version #################
Release:
Kylin Linux Advanced Server release V10 (Sword)Kernel:
4.19.90-25.35.v2101.ky10.x86_64Build:
Kylin Linux Advanced Server
release V10 (SP2) /(Sword)-x86_64-Build09/20210524
#################################################

二、基础信息

2.1 IP信息
准备两台虚拟机,一台当做服务端,一台当做客户端
服务端IP:172.16.211.131
客户端IP:172.16.211.129
2.2 两台机器分别执行关闭firewalld或者放行相关的端口
systemctl disable firewalld --now

三、服务端配置

3.1 配置rsync.conf文件

打开 /etc/rsyncd.conf,检查所有模块配置(如 [public] 或自定义模块),确保不允许匿名访问:

以下示例是添加一个新的共享目录

[anon]
path = /path/to/anon
# 以下为关键安全配置
auth users = allowed_user1,allowed_user2  # 指定允许访问的用户列表
secrets file = /etc/rsyncd.secrets        # 指定存储用户密码的文件
read only = yes                           # 设置为 yes 时禁止写入(根据需求调整)
list = no                                 # 禁止匿名用户查看模块列表
3.2 创建密码文件

生成 /etc/rsyncd.secrets 并设置权限:

echo "allowed_user1:password1" >> /etc/rsyncd.secrets
echo "allowed_user2:password2" >> /etc/rsyncd.secrets
chmod 600 /etc/rsyncd.secrets
3.3 重启rsyncd 服务
systemctl restart rsyncd

四、客户端测试

4.1 allowed_user1和allowed_user2用户测试
[kylin@localhost ~]$ rsync rsync://allowed_user1@172.16.211.131:/anon
Password: 
@ERROR: auth failed on module anon
rsync error: error starting client-server protocol (code 5) at main.c(1659) [Receiver=3.1.3]
[kylin@localhost ~]$ rsync rsync://allowed_user1@172.16.211.131:/anon
Password: 
drwxr-xr-x             32 2025/02/25 09:14:20 .
-rw-r--r--              0 2025/02/25 09:14:18 1.txt
-rw-r--r--              0 2025/02/25 09:14:20 2.txt
[kylin@localhost ~]$ 
[kylin@localhost ~]$ 
[kylin@localhost ~]$ 
[kylin@localhost ~]$ rsync rsync://allowed_user2@172.16.211.131:/anon
Password: 
drwxr-xr-x             32 2025/02/25 09:14:20 .
-rw-r--r--              0 2025/02/25 09:14:18 1.txt
-rw-r--r--              0 2025/02/25 09:14:20 2.txt
4.2 其他用户测试
[kylin@localhost ~]$ rsync rsync://allowed_user3@172.16.211.131:/anon
Password: 
@ERROR: auth failed on module anon
rsync error: error starting client-server protocol (code 5) at main.c(1659) [Receiver=3.1.3]

经过以上测试发现,允许目录中的allowed_user1、allowed_user2用户可以正常访问,不在允许目录中的allowed_user3用户无法正常访问。

关键字:开发公司质量安全科职责_莱芜雪野湖风景区_关键词seo排名怎么样_网络推广的公司是骗局吗

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: