Selinux CentOS Linux

Содержание
Introduction
conf
Перевести Selinux в режим permissive
Отключить Selinux
Статьи про CentOS

Introduction

conf

vi /etc/selinux/config

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

Проверить статус

sestatus

SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: permissive Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 33

Перевести Selinux в режим permissive

Вручную или с помощью sed замените SELINUX=enforcing на SELINUX=permissive

sed -i 's/SELINUX=enforcing/SELINUX=permissive/' config
setenforce

Проверить изменение

sestatus | grep "Current mode"

Current mode: permissive

Выключить компьютер

sudo shutdown -r now

Отключить Selinux

Вручную или с помощью sed замените SELINUX=enforcing на SELINUX=disabled

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' config
sudo shutdown -r now

Проверка

sestatus

SELinux status: disabled

Article author: Andrei Olegovich

Похожие статьи
CentOS
Network Configuration
Date Time
X Window System CentOS
XRDP: Remote Desktop
VNC: Remote Desktop
Change machine-id
Change ulimit
xclip: Buffer
docker-ce: install in CentOS 8
FAQ
Errors
Install virtual CentOS on Ubuntu
Docker container CentOS with SSH access
Setting the date and time in CentOS
Installing docker-ce in CentOS 8
CentOS
CentOS Linux machine-id
Network Configuration в CentOS
News CentOS
Selinux CentOS Linux
ulimit CentOS
X Window System CentOS
xclip в CentOS
Remote Desktop в CentOS

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.ru
Write to info@urn.su, info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: