关于Linux上的SSH服务无法启动,提示“/var/empty/sshd must be owned by root and not group or world-writable”错误...

首先通过物理终端进入到linux上,手工检查ssh发现没运行
# /etc/init.d/sshd status
sshd is stopped

手动启动服务,发现报告权限错误。
# /etc/init.d/sshd start
Starting sshd:/var/empty/sshd must be owned by root and not group or world-writable. [FAILED]

使用rpm -V 命令可检查到ssh的软件包正常,但某个目录的属主错误。
# rpm -V openssh-server
S.5..... c /etc/ssh/sshd_config
.....U.. /var/empty/sshd

经查看发现这个目录的属主不是root,所以启动ssh报错
# ls -ld /var/empty/sshd/
d--x--x--x 2 vu00106 root 1024 Feb 2 2005 /var/empty/sshd/

修改为root属主,启动成功
# chown root /var/empty/sshd/
/etc/init.d/sshd start
Starting sshd: [ OK ]
至此问题修复。

另外,还可以尝试使用下面的方法解决
chown -R root.root /var/empty/sshd
chmod 744 /var/empty/sshd
service sshd restart
就可以解决上述的问题.

转载于:https://www.cnblogs.com/Mr-Ding/p/9427962.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值