关于rsync中/etc/rsync.password的权限故障:

①客户端故障:

[[email protected] ~]# rsync -avz /backup/ [email protected]::backup/ --password-file=/etc/rsync.password

password file must not be other-accessible

continuing without password file

Password:

@ERROR: auth failed on module backup

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

[[email protected] ~]# ls -ld /etc/rsync.password

-rwxrwxrwx 1 root root 7 Sep 25 00:10 /etc/rsync.password

[[email protected] ~]#

②客户端故障:

[[email protected] backup]# rsync -avz /backup/ [email protected]::backup/ --password-file=/etc/rsync.password

password file must not be other-accessible

continuing without password file

Password:

@ERROR: auth failed on module backup

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

[[email protected] backup]#

③password file must not be other-accessible

其实这句话 就告诉我们权限有问题的了

④查看权限:

[[email protected] backup]# ls -ld /etc/rsync.password

-rwxrwxrwx 1 root root 7 Sep 25 00:10 /etc/rsync.password

[[email protected] backup]#

[[email protected] ~]# ls -ld /etc/rsync.password

-rwxrwxrwx 1 root root 7 Sep 25 00:10 /etc/rsync.password

[[email protected] ~]#

[[email protected] scripts]# ls -ld /etc/rsync.password

-rwxrwxrwx 1 root root 20 Sep 25 00:26 /etc/rsync.password

[[email protected] scripts]#

⑤修改权限:

[[email protected] scripts]# chmod 600 /etc/rsync.password

[[email protected] scripts]# ls -ld /etc/rsync.password

-rw------- 1 root root 20 Sep 25 00:26 /etc/rsync.password

[[email protected] scripts]#

[[email protected] ~]# ls -ld /etc/rsync.password

-rw------- 1 root root 7 Sep 25 00:10 /etc/rsync.password

[[email protected] ~]#

[[email protected] backup]# ls -ld /etc/rsync.password

-rw------- 1 root root 7 Sep 25 00:10 /etc/rsync.password

[[email protected] backup]#

⑥查看效果:

[[email protected] backup]#  rsync -avz /backup/ [email protected]::backup/ --password-file=/etc/rsync.password

sending incremental file list

sent 51 bytes  received 8 bytes  118.00 bytes/sec

total size is 0  speedup is 0.00

[[email protected] backup]#

##########################################################################################################################

[[email protected] ~]# rsync -avz /backup/ [email protected]::backup/ --password-file=/etc/rsync.password

sending incremental file list

./

sent 25 bytes  received 11 bytes  24.00 bytes/sec

total size is 0  speedup is 0.00

[[email protected] ~]#

时间: 2024-10-10 05:27:56

关于rsync中/etc/rsync.password的权限故障:的相关文章

在脚本中运用rsync——使用服务的方式进行同步

rsync以服务方式同步 环境:192.168.1.223和192.168.1.200主机ip在192.168.1.223服务端上,编辑/etc/rsyncd.conf配置文件 port=873 log file=/var/log/rsync.log pid file=/var/run/rsyncd.pid address=192.168.1.223 [path] path=/usr/local/src/tmp use chroot=true max connections=4 read onl

jenkins中使用rsync, scp命令

jenkins 中使用 rsync 命令 是出现一些错误输出 Host key verification failed. rsync: connection unexpectedly closed (0 bytes received so far) [sender] 和其他 Permission denied, please try again.Permission denied, please try again.Permission denied (publickey,password).r

jenkins 中使用 rsync时需注意的

1.jenkins 中使用 rsync 命令 是出现一些错误输出Host key verification failed.rsync: connection unexpectedly closed (0 bytes received so far) [sender]和其他Permission denied, please try again.Permission denied, please try again.Permission denied (publickey,password).rsy

rsync+inotify-tools和rsync+sersync实战应用的区别

一.为什么要用Rsync+sersync架构? 1.sersync是基于Inotify开发的,类似于Inotify-tools的工具 2.sersync可以记录下被监听目录中发生变化的(包括增加.删除.修改)具体某一个文件或某一个目录的名字,然后使用rsync同步的时候,只同步发生变化的这个文件或者这个目录. 二.Rsync+Inotify-tools与Rsync+sersync两种架构有什么区别? 2.1 Rsync+Inotify-tools (1):Inotify-tools只能记录下被监

rsync简介与rsync+inotify配置实时同步数据

rsync简介 rsync是linux系统下的数据镜像备份工具.使用快速增量备份工具Remote Sync可以远程同步,支持本地复制,或者与其他SSH.rsync主机同步. rsync特性 rsync支持很多特性: 可以镜像保存整个目录树和文件系统 可以很容易做到保持原来文件的权限.时间.软硬链接等等 无须特殊权限即可安装 快速:第一次同步时rsync会复制全部内容,但在下一次只传输修改过的文件.rsync在传输数据的过程中可以实行压缩及解压缩操作,因此可以使用更少的带宽 安全:可以使用scp.

rsync报错rsync: failed to set times on "." (in backup): Permission denied (13)

实际运用rsync练习中遇到rsync报错信息如: rsync: failed to set times on "." (in backup): Permission denied (13)rsync: recv_generator: failed to stat "ccc" (in backup): Permission denied (13) 翻译可知:更新.文件的时间失败:原因是权限不够. 此问题为权限问题,在文件权限无误: 参考文献,克制此处为selinux

关于如何在你的Web项目中实现对空间数据访问权限的控制(一)

Wednesday, 23 JUNE 近来一直在研究关于如何在我的WebGIS项目中实现对空间数据(已发布在GeoServer上)进行权限管理的问题.虽然到目前为止没能找到一个完美的解决方案,但通过这些天的学习与查阅资料,思路上多少有了一些进展,因此记录下来,做一个简单的小结. 1-GeoServer中的Security模块 GeoServer是一个基于J2EE基础实现的,允许用户共享和编辑地理空间数据的GIS应用服务器.——FROM GeoServer官方介绍. 其实,GeoServer的本质

MYSQL 查看数据库中所有用户及拥有权限

查看MYSQL数据库中所有用户 mysql> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;+---------------------------------------+| query                                 |+---------------------------------------+| User: 'cactiuser'@

使用 rsync 出错:rsync: chgrp "XXXX" failed: Operation not permitted

You are probably running rsync like this: rsync -a dir/ remote:/dir/ The -a option according to the documentation is equivalent to: -rlptgoD       -a, --archive    archive mode; equals -rlptgoD (no -H,-A,-X) You probably want to remove the -o and -g