跳转至

关闭 SELinux

约 67 个字 15 行代码 预计阅读时间不到 1 分钟

方法

临时

查询状态

getenforce

如果是开启状态,返回:

Enforcing

如果是关闭状态,返回:

Permissive

关闭

setenforce 0

永久

更改 /etc/sysconfig/selinux,将 SELINUX=enforcing 改为 SELINUX=disabled

# 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 three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

来源

docker redis 报错:find: ‘.‘: Permission denied chown: changing ownership of ‘.‘: Permission denied_我爱吃红薯的博客-CSDN博客