最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

rsync同步數(shù)據(jù)時提示password file must not be other-accessible的解決方法

 更新時間:2024年06月05日 16:52:57   作者:chengu04  
今天服務(wù)器同步數(shù)據(jù)的時候,突然有個命令提示這個錯誤,但其它的機器又正常,很奇怪,不過通過下面的命令執(zhí)行以下就可以了,windows與linux操作方法一致

rsync password file must not be other-accessible

報錯解釋:

這個錯誤信息表明rsync在使用密碼文件時遇到了權(quán)限問題。rsync要求密碼文件必須對于擁有其進程用戶的用戶和組是可讀的,但不能對其他任何用戶開放可讀權(quán)限。

解決方法:

確認密碼文件的權(quán)限設(shè)置。使用ls -l命令查看密碼文件的權(quán)限。

修改密碼文件的權(quán)限,確保其只對rsync服務(wù)的用戶可讀。通常這個用戶是rsync或nobody。

使用chmod命令修改權(quán)限。例如,如果rsync以user用戶身份運行,執(zhí)行:

chown user:user /path/to/password/file
chmod 600 /path/to/password/file

其中/path/to/password/file是密碼文件的路徑。

確保在修改權(quán)限后,重新啟動rsync服務(wù)以使更改生效。

故障現(xiàn)象:

今天做rsync遠程同步時,為了從備份源站點中使用免密方式同步文件,當時在發(fā)起端輸入了以下命令,

[root@localhost etc]# rsync -az --delete --password-file=/etc/server.pass backuper@14.0.0.10::wwwroot /opt/

提示了如下報錯:

故障排查和解決方法:

根據(jù)報錯提示的英文語句進行翻譯:
密碼文件不能被其他用戶訪問。
原來是密碼文件只能被屬主讀取和寫入,不能被其他用戶讀取,這是不安全的!
而創(chuàng)建的文件默認權(quán)限是644,需要將其設(shè)為600

[root@localhost etc]# ll | grep server.pass
-rw-r--r--.  1 root root        7 9月  10 16:43 server.pass

所以需要輸入以下命令來設(shè)置密碼文件的權(quán)限:

[root@localhost etc]# chmod 600 server.pass
[root@localhost etc]# ll | grep server.pass  #檢查一下權(quán)限是否改變
-rw-------.  1 root root        7 9月  10 16:43 server.pass

關(guān)于rsync中/etc/rsync.password的權(quán)限故障

①客戶端故障:

[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

其實這句話 就告訴我們權(quán)限有問題的了 

④查看權(quán)限:

[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]# 

⑤修改權(quán)限:

[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 ~]# 

到此這篇關(guān)于rsync同步數(shù)據(jù)時提示password file must not be other-accessible的解決方法的文章就介紹到這了,更多相關(guān)password file must not be other-accessible內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • CentOS 6.3 Rsync客戶端與Win2003 cwRsyncServer服務(wù)端實現(xiàn)數(shù)據(jù)同步

    CentOS 6.3 Rsync客戶端與Win2003 cwRsyncServer服務(wù)端實現(xiàn)數(shù)據(jù)同步

    這篇文章主要介紹了CentOS 6.3 Rsync客戶端與Win2003 cwRsyncServer服務(wù)端實現(xiàn)數(shù)據(jù)同步,需要的朋友可以參考下
    2015-07-07
  • Redis服務(wù)器筆記

    Redis服務(wù)器筆記

    redis是一個高性能的key-value存儲系統(tǒng),能夠作為緩存框架和隊列。下面通過本文給大家分享Redis服務(wù)器的筆記,感興趣的朋友一起看看吧
    2017-09-09
  • 游戲服務(wù)器中的Netty應(yīng)用以及源碼剖析

    游戲服務(wù)器中的Netty應(yīng)用以及源碼剖析

    這篇文章主要為大家介紹了游戲服務(wù)器中的Netty應(yīng)用以及源碼剖析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2022-08-08
  • GitLab?服務(wù)器宕機時的項目代碼恢復(fù)方法

    GitLab?服務(wù)器宕機時的項目代碼恢復(fù)方法

    當 GitLab 服務(wù)器意外宕機且沒有備份時,項目代碼的恢復(fù)變得尤為關(guān)鍵,這篇文章主要介紹了GitLab服務(wù)器宕機時的項目代碼恢復(fù)方法,需要的朋友可以參考下
    2025-04-04
  • Visual Studio Code上傳文件到服務(wù)器的操作方法

    Visual Studio Code上傳文件到服務(wù)器的操作方法

    在 Visual Studio Code (VS Code) 中上傳文件到 Linux 系統(tǒng)主要通過SSH 協(xié)議實現(xiàn),結(jié)合圖形界面(GUI)或命令行工具操作,以下是具體說明及進度查看、斷點續(xù)傳的實現(xiàn)方法,感興趣的朋友一起看看吧
    2025-07-07
  • HTTP-Header中常見字段及含義詳解

    HTTP-Header中常見字段及含義詳解

    這篇文章主要為大家介紹了HTTP-Header中常見字段及含義詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2023-11-11
  • rsync 安裝使用詳解

    rsync 安裝使用詳解

    rsync是類unix系統(tǒng)下的數(shù)據(jù)鏡像備份工具,從軟件的命名上就可以看出來了——remote sync
    2013-03-03
  • aws服務(wù)器更換實例規(guī)格后ssh無法登陸的解決方案

    aws服務(wù)器更換實例規(guī)格后ssh無法登陸的解決方案

    這篇文章主要介紹了aws服務(wù)器更換實例規(guī)格后ssh無法登陸,本文給大家介紹的非常詳細,對大家的學(xué)習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2023-07-07
  • Rsync 服務(wù)安全加固方法

    Rsync 服務(wù)安全加固方法

    Rsync 是一個通過檢查文件的時間戳和大小,來跨計算機系統(tǒng)高效地傳輸和同步文件的工具,建議您在使用 Rsync 服務(wù)端時,參考本文對 Rsync 服務(wù)進行安全加固,保障數(shù)據(jù)安全
    2018-02-02
  • cwRsync提示password file must be owned by root when running as root的解決方法

    cwRsync提示password file must be owned by root when running as

    今天在配置服務(wù)器的時候,用了rsync4.10版本,客戶端是2003服務(wù)器端是2008 r2 同步的時候提示password file must be owned by root when running as root問題,以前用老版本的時候沒見過,還好看了下面的文章解決了,特分享下
    2015-08-08

最新評論

柳林县| 平乡县| 鄂伦春自治旗| 若尔盖县| 惠水县| 公安县| 类乌齐县| 扶沟县| 侯马市| 上犹县| 高阳县| 孟津县| 嵩明县| 长岭县| 讷河市| 郴州市| 县级市| 密山市| 新干县| 于都县| 奉贤区| 沂水县| 仙桃市| 郑州市| 池州市| 东港市| 台中县| 永寿县| 揭阳市| 柘城县| 繁峙县| 沙田区| 六枝特区| 上饶市| 绍兴市| 杭锦后旗| 佳木斯市| 武定县| 新干县| 黔西县| 如东县|