arrow_back
Back

SELinux: status, enforcement, and boolean policies

Andrew Dorokhov Andrew Dorokhov schedule 1 min read
menu_book Table of Contents

SELinux (Security-Enhanced Linux) is a mandatory access control (MAC) layer for Linux.

Current status

sestatus

Enable or disable enforcement (runtime)

setenforce 1   # enforcing
setenforce 0   # permissive

Boolean policies

List all booleans and their state (on / off):

getsebool -a

Change a boolean permanently (-P writes to policy):

setsebool -P <policy-name> on
setsebool -P <policy-name> off

Further reading

code

Need Help with Development?

Happy to help — reach out via the contacts or go straight to my Upwork profile.

work View Upwork Profile arrow_forward
Next Article

PHP on Linux: installation, configuration, and PHP-FPM

arrow_forward