在機(jī)器上直接登錄,問題顯示如下:
/var/empty/sshd must be owned by root and not group or world-writable.
問題:
Linux上的SSH無法啟動(dòng)
報(bào)告/var/empty/sshd must be owned by root and not group or world-writable.
解決辦法:
首先通過物理終端進(jìn)入到linux上,手工檢查ssh發(fā)現(xiàn)沒運(yùn)行
-bash-2.05b# /etc/init.d/sshd status
sshd is stopped
手工啟動(dòng)服務(wù),發(fā)現(xiàn)報(bào)告權(quán)限錯(cuò)誤。
-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的軟件包正常,但某個(gè)目錄的屬主錯(cuò)誤。
-bash-2.05b# rpm -V openssh-server
S.5..... c /etc/ssh/sshd_config
.....U.. /var/empty/sshd
-bash-2.05b#
經(jīng)查看發(fā)現(xiàn)這個(gè)目錄的屬主不是root,所以啟動(dòng)ssh報(bào)錯(cuò)
-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屬主,啟動(dòng)成功
-bash-2.05b# chown root /var/empty/sshd/
-bash-2.05b# /etc/init.d/sshd start
Starting sshd: [ OK ]
-bash-2.05b#
至此問題修復(fù)。
另外,還可以嘗試:
這個(gè)是權(quán)限的問題
可采取以下兩步解決
chown -R root.root /var/empty/sshd
chmod 744 /var/empty/sshd
service sshd restart
就可以解決上述的問題。