Customizing SELinux Policies
You can customize an SELinux policy by enabling or disabling the members of a set of Boolean values. Any changes that you make take effect immediately and do not require a reboot.
To display the Boolean values and their descriptions, use the following command:
semanage boolean -l
SELinux boolean State Default Description
ftp_home_dir (off , off)
Determine whether ftpd can read and write files in user home directories.
smartmon_3ware (off , off)
Determine whether smartmon can support devices on 3ware controllers.
mpd_enable_homedirs (off , off)
Determine whether mpd can traverse user home directories.
...
You can use the getsebool and setsebool commands to display and set the value of a specific Boolean.
getsebool boolean
sudo setsebool boolean on|off
The following example shows how you to display and set the value of the
ftp_home_dir
Boolean:
getsebool ftp_home_dir
ftp_home_dir --> off
sudo setsebool ftp_home_dir on
getsebool ftp_home_dir
ftp_home_dir --> on
To switch the value of a Boolean, use the togglesebool command, as shown in the following example:
sudo togglesebool ftp_home_dir
ftp_home_dir: inactive
To make the value of a Boolean persist across reboots, specify the -P
option to setsebool, for example:
sudo setsebool -P ftp_home_dir on
getsebool ftp_home_dir
ftp_home_dir --> on