码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2016-09-27 12:01:49      阅读:151      评论:0      收藏:0      [点我收藏+]

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

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

①客户端故障:

[root@nfs01-31 ~]# rsync -avz /backup/ rsync_backup@10.0.0.41::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]

[root@nfs01-31 ~]# ls -ld /etc/rsync.password 

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

[root@nfs01-31 ~]# 

②客户端故障:

[root@web01-8 backup]# rsync -avz /backup/ rsync_backup@10.0.0.41::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]

[root@web01-8 backup]# 


③password file must not be other-accessible

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


④查看权限:

[root@web01-8 backup]# ls -ld /etc/rsync.password

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

[root@web01-8 backup]# 

[root@nfs01-31 ~]# ls -ld /etc/rsync.password

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

[root@nfs01-31 ~]# 

[root@backup-41 scripts]# ls -ld /etc/rsync.password

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

[root@backup-41 scripts]# 


⑤修改权限:

[root@backup-41 scripts]# chmod 600 /etc/rsync.password

[root@backup-41 scripts]# ls -ld /etc/rsync.password

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

[root@backup-41 scripts]# 

[root@nfs01-31 ~]# ls -ld /etc/rsync.password

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

[root@nfs01-31 ~]# 

[root@web01-8 backup]# ls -ld /etc/rsync.password

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

[root@web01-8 backup]# 


⑥查看效果:

[root@web01-8 backup]#  rsync -avz /backup/ rsync_backup@10.0.0.41::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

[root@web01-8 backup]# 

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

[root@nfs01-31 ~]# rsync -avz /backup/ rsync_backup@10.0.0.41::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

[root@nfs01-31 ~]# 


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

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

原文地址:http://jinchengzheng.blog.51cto.com/10798482/1856782

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!