The following example shows sample contents of the
/selinux/
directory:
-rw-rw-rw- 1 root root 0 Sep 22 13:14 access dr-xr-xr-x 1 root root 0 Sep
22 13:14 booleans --w------- 1 root root 0 Sep 22 13:14 commit_pending_bools
-rw-rw-rw- 1 root root 0 Sep 22 13:14 context -rw-rw-rw- 1 root root 0 Sep
22 13:14 create --w------- 1 root root 0 Sep 22 13:14 disable -rw-r--r-- 1
root root 0 Sep 22 13:14 enforce -rw------- 1 root root 0 Sep 22 13:14 load
-r--r--r-- 1 root root 0 Sep 22 13:14 mls -r--r--r-- 1 root root 0 Sep 22
13:14 policyvers -rw-rw-rw- 1 root root 0 Sep 22 13:14 relabel -rw-rw-rw- 1
root root 0 Sep 22 13:14 user
For example, running the
cat
command on the
enforce
file reveals either a
1
for enforcing
mode or
0
for permissive mode.
2.2. SELinux Configuration Files
The following sections describe SELinux configuration and policy files, and related file systems
located in the
/etc/
directory.
2.2.1. The
/etc/sysconfig/selinux
Configuration File
There are two ways to configure SELinux under Red Hat Enterprise Linux: using the Security
Level Configuration Tool (
system-config-securitylevel
), or manually editing the
configuration file (
/etc/sysconfig/selinux
).
The
/etc/sysconfig/selinux
file is the primary configuration file for enabling or disabling
SELinux, as well as setting which policy to enforce on the system and how to enforce it.
Note
The
/etc/sysconfig/selinux
contains a symbolic link to the actual
configuration file,
/etc/selinux/config
.
The following explains the full subset of options available for configuration:
•
SELINUX=<enforcing|permissive|disabled>
— Defines the top-level state of SELinux on a
system.
•
enforcing
— The SELinux security policy is enforced.
•
permissive
— The SELinux system prints warnings but does not enforce policy. This is
useful for debugging and troubleshooting purposes. In permissive mode, more denials will
be logged, as subjects will be able to continue with actions otherwise denied in enforcing
mode. For example, traversing a directory tree will produce multiple
avc: denied
messages for every directory level read, where a kernel in enforcing mode would have
Chapter 21. SELinux
366
Summary of Contents for ENTERPRISE LINUX 4.5.0 -
Page 1: ...Red Hat Enterprise Linux 4 5 0 4 5 0 Reference Guide ISBN N A Publication date ...
Page 2: ...Red Hat Enterprise Linux 4 5 0 ...
Page 4: ...Red Hat Enterprise Linux 4 5 0 ...
Page 24: ...xxiv ...
Page 26: ......
Page 36: ...12 ...
Page 72: ...48 ...
Page 112: ...88 ...
Page 122: ...98 ...
Page 140: ...116 ...
Page 142: ......
Page 300: ...276 ...
Page 318: ...294 ...
Page 320: ......
Page 332: ...308 ...
Page 350: ...326 ...
Page 378: ...354 ...
Page 388: ...364 ...
Page 394: ...370 ...
Page 395: ...Part IV Appendixes ...
Page 396: ......