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

问题描述:

开发反馈在增加Oracle用户后,能PING通主机,Telnet不通对应端口。客户端截图如下:

问题分析:

可能多用户操作过程中或创建用户设置属组\属主权限的时权限操作失误等;

操作步骤:

1.查看SSH服务状态:

[root@Centos67108 ~]# service sshd restart
Stopping sshd:                 [FAILED]
Starting sshd: /var/empty/ssdh must be owned by root and not group or world-writable. [FAILED]
[root@Centos67108 ~]# /etc/init.d/sshd status
Openssh-daemon is stopped

注解:Restart服务,发现报告权限错误。

2.使用rpm -V 检查ssh的软件包状态,发现某个目录的属主错误。

正常环境下检查状态如下:

本环境下状态如下:

[root@Centos67108 ~]# rpm -V openssh-server
S.5....T. c  /etc/ssh/sshd_config
.M.......   /var/empty/sshd

3.查看该目录属主权限,并与正常环境下目录做对比。

正常环境下检查状态如下:

本环境下状态如下:

[root@Centos67108 ~]# ls -ld /var/empty/sshd/
drwxrwxrwx. 2 root root 4096 Mar 22 2016 /var/empty/sshd/

对比后分析可能是权限问题。

4.修改/var/empty/sshd目录权限:

[root@Centos67108 ~]# chmod 744 /var/empty/sshd
[root@Centos67108 ~]# service sshd restart
Stopping sshd: [ FAILED ]
Starting sshd:   [     OK    ]

备注:部分情况下,可能是属组属主问题,可通过修改属组\属主解决问题。

[root@Centos67108 ~]# chown -R root.root /var/empty/sshd
[root@Centos67108 ~]# chmod 744 /var/empty/sshd

5. Starting sshd: /var/empty/sshd must be owned by root and not group or world-writable. [FAILED] 问题解决。

小温

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: