0

I have set CentOS 8 Stream with SELinux set to permissive but I still have bunch of red lines in the log e.g.:

SELinux is preventing /usr/lib/systemd/systemd from name_connect access on the tcp_socket port 80

Are these real or its just printing - what would be happening if it was in restrictive mode?

Boppity Bop
  • 752
  • 3
  • 11
  • 34
  • 1
    Disabling or setting `SELinux` to `permissive` mode is not recommended. It is there for a reason. A better approach would be to look into the problem and solve it with `SELinux` enabled. – Valentin Bajrami Nov 25 '21 at 20:13

1 Answers1

3

Per the documentation:

When SELinux is running in permissive mode, SELinux policy is not enforced. The system remains operational and SELinux does not deny any operations but only logs AVC messages, which can be then used for troubleshooting, debugging, and SELinux policy improvements.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/using_selinux/changing-selinux-states-and-modes_using-selinux

Also see /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=permissive
Bert
  • 2,863
  • 12
  • 13
  • yes this is why I asked because these bits of log are printed as if they were errors not warnings and I dont really know were these actions stopped or let through with the print in the log.. they could have made it more clear in the log text – Boppity Bop Nov 26 '21 at 14:54
  • Even in Permissive mode, SELinux is blocking/denying file access. I am directly experiencing this in CentOS8 and RL8 as are others: https://github.com/jellyfin/jellyfin/issues/8114 – utdrmac Dec 13 '22 at 13:51