Rsync 服务器配置指南:/etc/rsyncd.conf详解
Rsync 服务器配置指南:/etc/rsyncd.conf详解
/etc/rsyncd.conf 是 rsync 守护进程的配置文件,用于设置 rsync 服务器的参数和共享目录。
示例配置
uid = nobody
gid = nobody
use chroot = yes
max connections = 4
timeout = 300
[share]
path = '/path/to/shared/folder'
comment = 'Shared Folder'
read only = no
list = yes
配置参数解释
- uid 和 gid 指定 rsync 守护进程运行的用户和组。通常使用 nobody。
- use chroot 指定是否使用 chroot 环境,这可以增加安全性。
- max connections 指定最大连接数。
- timeout 指定连接超时时间(单位为秒)。
- [share] 是共享目录的名称。
- path 指定共享目录的路径。
- comment 对共享目录的描述。
- read only 指定是否只读。
- list 指定是否允许列出共享目录中的文件。
启动和检查 rsync 守护进程
配置完成后,需要启动 rsync 守护进程。可以使用以下命令:
sudo systemctl start rsync
也可以使用以下命令检查 rsync 守护进程的状态:
sudo systemctl status rsync
原文地址: https://www.cveoy.top/t/topic/kNeq 著作权归作者所有。请勿转载和采集!