折雨的天空

新浪微薄腾讯微薄

最新碎语:最近霉到了住。哎。。。

您的位置:折雨的天空 >其他技术> rsync以linux作为服务器来配置,报错:rsyncd bind() failed: Permission denied

rsync以linux作为服务器来配置,报错:rsyncd bind() failed: Permission denied

配置参考:

https://www.cnblogs.com/wucongzhou/p/12660135.html


这篇文章写的很详细。

我并没有按照这篇文章配置。我是通过yum安装的。

安装完成后,没有配置文件,需要自己创建。


配置文件如下:



use chroot = false
strict modes = false
hosts allow = 192.18.0.0/255.255.255.0
log file = /var/log/rsyncd.log
port = 8179 #默认端口8173
uid = 0 #不指定uid,不加这一行将无法使用任何账户
gid = 0 #不指定gid
max connections = 10 #最大连接数10

[www]
path = /userdata
read only = false
transfer logging = yes
lock file = rsyncd_user.lock
exclude from = rsync.exclude

这里需要注意配置:log file = /var/log/rsyncd.log部分。



如果配置完成。需要使用:


systemctl enable rsyncd

加入到系统服务。


这个时候启动服务,可能会报错,可以使用:


service rsyncd status -l

进行查看。如果报错没有详细信息,


[#zeyu#]

可以查看conf中的日志文件。

本例中使用/var/log/rsyncd.log

文件中,如果报错:rsyncd  bind() failed: Permission denied


就是由于SELinux的原因


关闭了,即可。


关闭参考:https://www.cnblogs.com/activiti/p/7552677.html

[/#zeyu#]

至此,解决问题。


------------正 文 已 结 束, 感 谢 您 的 阅 读 (折雨的天空)--------------------

转载请注明本文标题和链接:《rsync以linux作为服务器来配置,报错:rsyncd bind() failed: Permission denied

奖励一下

取消

分享不易,烦请有多多打赏,如您也困难,点击右边关闭即可!

扫码支持
扫码打赏,5元,10元,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

-秒后自动关闭,如已打赏,或者不愿打赏,请点击右上角关闭图标。

发表评论

路人甲 表情
看不清楚?点图切换