selinux未关闭,导致动态库无法使用

简介:

问题描述:新安装系统,安装完之前,可以正常登录,过了1天后,无法ssh连接了。


分析:

1.登录系统检查sshd服务正常,检查iptable没有问题。

2.检查动态库,没有发现任何问题。

3.重启sshd服务,提示Permission denied,具体如下图: 

wKiom1MerkaQ4GjZAADS-oBc8ss522.jpg


4.检查此库权限,发现有读取和执行权限。

5.检查/var/log/messages和/var/log/secure发现有selinux开启,怀疑selinux导致。

6.尝试临时先关闭selinux。然后再次重启,结果正常了。

查看selinux:#getenforce

临时开启selinux:  #setenforce 0

7.永久关闭selinux

#vi /etc/sysconfig/selinux


# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted


解决方法:关闭selinux后正常。(后续有时间,需要研究下selinux具体限制动态库的过程 )



本文转自 woshiwei201 51CTO博客,原文链接:http://blog.51cto.com/chenwei/1372528

相关文章
|
1月前
关闭文件
关闭文件。
12 2
|
7月前
|
安全 Linux Shell
16.5.3 【Linux】SELinux 三种模式的启动、关闭与观察
16.5.3 【Linux】SELinux 三种模式的启动、关闭与观察
121 0
|
11月前
|
缓存 编解码 安全
SELinux 权限问题导致 GreatSQL 运行不了的坑
SELinux 权限问题导致 GreatSQL 运行不了的坑
|
安全 开发工具