rsync @ERROR: chdir failed 的解決方法
CwRsyncServer在windows服務(wù)器上遇到這樣的問題:
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1495) [rec
eiver=3.0.2]
權(quán)限問題:
1)新建一個(gè)目錄比如, 進(jìn)入 開始菜單>cwRsync Server>Prep a Dir for Upload, 選擇D:\folder1 ,確定
2)右鍵點(diǎn)擊folder1 文件夾, 進(jìn)入 屬性>安全, "添加"用戶, 輸入對(duì)象名稱為Svcwrsync, 并將Svcwrsync的權(quán)限設(shè)置為 所有都允許。
提升用戶權(quán)限:
如果安全性要求不是很高的情況下,目錄較多可以將Svcwrsync提升為管理員權(quán)限,一定配置限制制定ip才能同步文件。
ps: 修改完rsyncd.conf, 要重啟RsyncServer服務(wù)才能生效
原因三、檢查目錄是不是有問題,我這把就是d與e盤錯(cuò)了盤符導(dǎo)致無(wú)法同步
linux服務(wù)器下:
系統(tǒng)平臺(tái):RHEL5.3
客戶機(jī):
[root@test1 ~]# rsync -vzrtopg --progress --delete --password-file=/etc/rsyncd.pwd marsaber@10.10.10.3::backup /var/www/html
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1296) [sender=2.6.8]
服務(wù)器日志(/var/log/rsyncd.log):
rsync: chdir /backup failed: Permission denied (13)
原因及解決辦法:
SELinux;
setsebool -P rsync_disable_trans on
error總結(jié):
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1296) [receiver=2.6.8]
原因及解決辦法:
這一般是在服務(wù)器端沒有建立目錄
或者是如果有開啟SELinux只要執(zhí)行一下命令
SELinux;
setsebool -P rsync_disable_trans on
切記: rsyncd.secrets的權(quán)限必須為600
(注意:這個(gè)安全設(shè)置很重要,如果不這樣做客戶機(jī)連接服務(wù)器時(shí)會(huì)提示:
password file must not be other-accessible
rsync error: some files could not be transferred (code 23) at main.c(1298) [generator=2.6.8]
@ERROR: auth failed on module
rsync: connection unexpectedly closed (102 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)
服務(wù)器端日志將出現(xiàn)錯(cuò)誤提示:
2005/08/23 06:32:01 [8388] secrets file must not be other-accessible (see strict modes option)
2005/08/23 06:32:01 [8388] continuing without secrets file
2005/08/23 06:32:01 [8388] auth failed on module from documentserver
服務(wù)器端rsyncd.secrets (用戶:密碼)<用戶必須是系統(tǒng)用戶,密碼盡量不要為系統(tǒng)用戶密碼>
客戶端rsyncd.secrets (密碼)<服務(wù)器端密碼>
服務(wù)器和客戶端的帳戶密碼都不可以有空格,否則會(huì)出現(xiàn)
@ERROR: auth failed on module
注意:
如果改變了端口號(hào),一定要在/etc/services中把對(duì)應(yīng)的端口改變才能正常運(yùn)行
如rsync 873/tcp改成
rsync 3334/tcp即可
error3:
rsyncd.secrets的密碼一定要和Rsync Server密碼設(shè)定檔案里的密碼一樣。如果不同(跟不是linux合法用戶錯(cuò)誤一樣),將會(huì)出現(xiàn)如下的錯(cuò)誤:
#rsync -azv /home rsync://root@192.168.1.107/hadoop --password-file=/home/rsyncd.secrets
@ERROR: auth failed on module hadoop
rsync error: error starting client-server protocol (code 5) at main.c(1296) [sender=2.6.8]
error4:
在client上遇到問題:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
rsync: could not open password file "/etc/rsync.pas": No such file or directory (2)
Password:
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到這個(gè)問題:client端沒有設(shè)置/etc/rsync.pas這個(gè)文件,而在使用rsync命令的時(shí)候,加了這個(gè)參數(shù)--
password-file=/etc/rsync.pas
error5:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到這個(gè)問題,是因?yàn)榉?wù)器端的/home/backup 其中backup這個(gè)目錄并沒有設(shè)置,所以提示:chdir failed
error6:
rsync: write failed on "/home/backup2010/wensong": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(302) [receiver=3.0.7]
rsync: connection unexpectedly closed (2721 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [generator=3.0.7]
磁盤空間不夠,所以無(wú)法操作。
可以通過df /home/backup2010 來(lái)查看可用空間和已用空間
error7:
1、權(quán)限問題
類似如下的提示:rsync: opendir "/kexue" (in dtsChannel) failed: Permission denied (13)注意查看同步的目錄權(quán)限是否為755
2、time out
rsync: failed to connect to 203.100.192.66: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
檢查服務(wù)器的端口netstat –tunlp,遠(yuǎn)程telnet測(cè)試。
3、服務(wù)未啟動(dòng)
rsync: failed to connect to 10.10.10.170: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
啟動(dòng)服務(wù):rsync --daemon --config=/etc/rsyncd.conf
4、磁盤空間滿
rsync: recv_generator: mkdir "/teacherclubBackup/rsync……" failed: No space left on device (28)
*** Skipping any contents from this failed directory ***
5、Ctrl+C或者大量文件
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544) [receiver=3.0.5]
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544) [generator=3.0.5]
6、xnetid啟動(dòng)(linux)
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(759) [receiver=3.0.5]
相關(guān)文章
Windows遠(yuǎn)程數(shù)據(jù)、文件同步工具cwRsync配置方法
這篇文章主要介紹了Windows遠(yuǎn)程數(shù)據(jù)、文件同步工具cwRsync配置方法,需要的朋友可以參考下2015-10-10服務(wù)器的硬件配置經(jīng)驗(yàn)分享(如何正確配置服務(wù)器以提高網(wǎng)站性能)
服務(wù)器的配置是互聯(lián)網(wǎng)技術(shù)領(lǐng)域中非常重要的一環(huán),一個(gè)合理配置的服務(wù)器可以提高系統(tǒng)的性能和穩(wěn)定性,保證用戶的訪問體驗(yàn),在本文中,我將介紹服務(wù)器配置的具體步驟和流程2023-08-08微服務(wù)架構(gòu)之服務(wù)注冊(cè)與發(fā)現(xiàn)功能詳解
這篇文章主要為大家介紹了微服務(wù)架構(gòu)之服務(wù)注冊(cè)與發(fā)現(xiàn)的功能詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步早日升職加薪2022-01-01設(shè)置好的iis服務(wù)器怎么打開網(wǎng)頁(yè)(圖文詳解)
讓自己電腦上的網(wǎng)頁(yè)在局域網(wǎng)中可以訪問到,就需要我們使用IIS服務(wù)器,將網(wǎng)頁(yè)添加到服務(wù)器上的網(wǎng)站,那么設(shè)置好IIS服務(wù)器之后怎樣在瀏覽器中進(jìn)行訪問呢,下面跟隨腳本之家小編一起學(xué)習(xí)吧2016-11-11MongoDB學(xué)習(xí)筆記(三) 在MVC模式下通過Jqgrid表格操作MongoDB數(shù)據(jù)
下面我們將逐步講解怎么在MVC模式下將MongoDB數(shù)據(jù)讀取,并展示在前臺(tái)Jqgrid表格上。這個(gè)“簡(jiǎn)易系統(tǒng)”的基本設(shè)計(jì)思想是這樣的:我們?cè)谝晥D層展示表格,Jqgrid相關(guān)Js邏輯全部放在一個(gè)Js文件中,控制層實(shí)現(xiàn)了“增刪查改”四個(gè)業(yè)務(wù),MongoDB的基本數(shù)據(jù)訪問放在了模型層實(shí)現(xiàn)2013-07-07通過StatefulSet部署有狀態(tài)服務(wù)應(yīng)用實(shí)現(xiàn)方式
這篇文章主要為大家介紹了通過StatefulSet部署有狀態(tài)服務(wù)應(yīng)用的實(shí)現(xiàn)方式,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-03-03大數(shù)據(jù)平臺(tái)使用搭建腳本一鍵安裝OS
本文給大家分享的是如何在大數(shù)據(jù)平臺(tái)使用腳本來(lái)實(shí)現(xiàn)一鍵安裝定制OS,并給大家附上了腳本源碼,有需要的小伙伴可以參考下2018-03-03如何使用 Rails 和七牛云存儲(chǔ),在 15 分鐘內(nèi)打造一個(gè)圖片分享社交應(yīng)用原型
今天,就讓我們一起來(lái)看看如何使用 Rails 和七牛云存儲(chǔ),在 15 分鐘內(nèi)打造一個(gè)圖片分享社交應(yīng)用原型2016-03-03完美解決IIS和APACHE的301重定向(帶參數(shù))
感覺BAIDU spider對(duì)404的重定向似乎無(wú)動(dòng)于衷,于是近日干脆對(duì)原失效的鏈接重新設(shè)置301重定向。2010-11-11