SSH無法啟動,報告/var/empty/sshd must be owned by root and not group or world-writable

chenfengwww發表於2011-03-28

轉自:http://blog.163.com/wangkangming2008@126/blog/static/7827792820105140346371/

在機器上直接登入,問題顯示如下:

  /var/empty/sshd must be owned by root and not group or world-writable.

  問題:

  Linux上的SSH無法啟動

  報告/var/empty/sshd must be owned by root and not group or world-writable.

  解決辦法:

  首先透過物理終端進入到linux上,手工檢查ssh發現沒執行

  -bash-2.05b# /etc/init.d/sshd status

  sshd is stopped

  手工啟動服務,發現報告許可權錯誤。

  -bash-2.05b# /etc/init.d/sshd start

  Starting sshd:/var/empty/sshd must be owned by root and not group or world-writable.

  [FAILED]

  -bash-2.05b#

  使用rpm -V 命令可檢查到ssh的軟體包正常,但某個目錄的屬主錯誤。

  -bash-2.05b# rpm -V openssh-server

  S.5..... c /etc/ssh/sshd_config

  .....U.. /var/empty/sshd

  -bash-2.05b#

  經檢視發現這個目錄的屬主不是root,所以啟動ssh報錯

  -bash-2.05b# ls -ld /var/empty/sshd/

  d--x--x--x 2 vu00106 root 1024 Feb 2 2005 /var/empty/sshd/

  -bash-2.05b#

  修改為root屬主,啟動成功

  -bash-2.05b# chown root /var/empty/sshd/

  -bash-2.05b# /etc/init.d/sshd start

  Starting sshd: [ OK ]

  -bash-2.05b#

  至此問題修復。

  另外,還可以嘗試:

  這個是許可權的問題

  可採取以下兩步解決

  chown -R root.root /var/empty/sshd

  chmod 744 /var/empty/sshd

  service sshd restart

  就可以解決上述的問題。

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22036495/viewspace-1047866/,如需轉載,請註明出處,否則將追究法律責任。

相關文章