Security News > 2021 > March > How to use semanage and avoid disabling SELinux

How to use semanage and avoid disabling SELinux
2021-03-19 16:50

Jack Wallen introduces you to three semanage commands that will help make dealing with SELinux considerably easier.

With semanage, you can adjust file contexts, port contexts and booleans, which will go a long way to help you make things workable, while not disabling the security system.

With semanage boolean, you can enable and disable sets of allow rules, which makes it possible to allow different rule sets for different use cases.

Sudo semanage boolean -m -on httpd read user content.

Sudo semanage boolean -l How to use semanage fcontext.

If you simply configure sshd config for this, you'll find SELinux will block you from gaining access as SELinux isn't aware that you've made this change.


News URL

https://www.techrepublic.com/article/how-to-use-semanage-and-avoid-disabling-selinux/#ftag=RSS56d97e7