略微加速

略速 - 互联网笔记

rsync同步失败: rsync: failed to connect to xxx: Permission denied (13)解决方法

2020-04-27 leiting (2110阅读)

标签 运维 Linux

rsync同步文件时报错:

rsync: failed to connect to xxx: Permission denied (13)rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.6]

出现这个错误是因为selinux, linux安全增强的补丁导致的。

解决方法是禁用selinux的安全增强, 可以使用命令 setenforce 0来临时禁用,或者通过修改配置文件/etc/sysconfig/selinux 添加 SELINUX=disabled来永久禁用

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted


北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3