uid = cho #目录的创建者
gid = cho #目录所属的组
use chcho = no
max connections = 100
pid file = /var/run/rsyncd.pid
log file = /var/log/rsync
list = no #不允许列文件
strict modes = no
######定义自己需要的模块##############
[publish_zt] #认证的模块名,在client端需要指定
#目录的创建者
uid = cho
#目录所属的组
gid = cho
#需要做镜像的目录,比如客户端传文件到服务器端,就会进到这个目录
path=/data1/www
use chcho = no
read only = no
list = yes
hosts allow = 192.168.38.174 #允许的ip地址域,就是客户端要连接服务器,必须在此把客户端ip写到此处
UID = 0
GID = 0
use chroot = false
编辑/etc/rsyncd.conf
还需要在服务器添加端口
-A RH-Firewall-1-INPUT -m tcp -p tcp --dport 873 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 873 -j ACCEPT
修改文件/etc/sysconfig/iptables 增加上面2行.重启防火墙
service iptables restart