Chinaunix首页 | 论坛 | 博客
  • 博客访问: 92652527
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-24 15:10:53

作者: Austria  出自:
近几天,Linux用SSH登陆突然出现问题,显示不能连接, 在机器上直接登陆,问题显示如下:

/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
就可以解决上述的问题
阅读(655) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2008-05-25 10:22:11

文章是转贴的,也可以到原文站咨询。