查看完整版本: 解決 restorecond錯誤 : Will not restore a file with more than one hard link


apple 2012-1-12 12:30

解決 restorecond錯誤 : Will not restore a file with more than one hard link

<div>如果在 /var/log/message 出現這樣的錯誤訊息:</div><div>restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory</div><div><br></div>那是因為在CentOS或RHEL中...<div>/etc/sysconfig/networking/profiles/default/resolv.conf 是hard link 到/etc/resolv.conf,我們可以透過下列指令找出全部的hard link<br>(1)&nbsp;#find / -xdev -samefile /etc/resolv.conf<br><br>輸出結果大致如下:<br>(1)<br>/etc/sysconfig/networking/profiles/default/resolv.conf<br>/etc/resolv.conf<br><br>解決方法,用root權限依序執行下列步驟即可:</div><div>[quote]<br>(1)<br>#rm /etc/sysconfig/networking/profiles/default/resolv.conf<br>(2)<br>#restorecon /etc/resolv.conf<br>(3)<br>#ln /etc/resolv.conf /etc/sysconfig/networking/profiles/default/resolv.conf<br>[/quote]<br><br>如果你沒有開啟 SELinux 的話...其實你可以關閉這個服務...</div><div>#chkconfig&nbsp;restorecond off</div><div>#service&nbsp;restorecond stop</div><div><br></div><div>這樣就不會執行啦~~<br><br>參考資料:<br>http://www.cyberciti.biz/faq/linux-rhel-fedora-cen...orecond-will-not-restoreafile/<br></div>
頁: [1]
查看完整版本: 解決 restorecond錯誤 : Will not restore a file with more than one hard link