zoukankan      html  css  js  c++  java
  • 关于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
    就可以解决上述的问题.

  • 相关阅读:
    P1908 逆序对
    P1967 货车运输
    成也DP,败也DP(AFO?)
    Review Before THUWC2020
    THUWC2020游记
    loj6295. 无意识之外的捉迷藏
    loj6504. 「雅礼集训 2018 Day5」Convex
    某道XJ题
    loj2304. 「NOI2017」泳池
    loj6435. 「PKUSC2018」星际穿越
  • 原文地址:https://www.cnblogs.com/Mr-Ding/p/9427962.html
Copyright © 2011-2022 走看看