此内容没有您所选择的语言版本。
5.5. Booleans
Booleans allow parts of SELinux policy to be changed at runtime, without any knowledge of SELinux policy writing. This allows changes, such as allowing services access to NFS volumes, without reloading or recompiling SELinux policy.
5.5.1. Listing Booleans 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
For a list of Booleans, an explanation of what each one is, and whether they are on or off, run the
semanage boolean -l command as the Linux root user. The following example does not list all Booleans:
The
SELinux boolean column lists Boolean names. The Description column lists whether the Booleans are on or off, and what they do.
In the following example, the
ftp_home_dir Boolean is off, preventing the FTP daemon (vsftpd) from reading and writing to files in user home directories:
ftp_home_dir -> off Allow ftp to read and write files in the user home directories
ftp_home_dir -> off Allow ftp to read and write files in the user home directories
The
getsebool -a command lists Booleans, whether they are on or off, but does not give a description of each one. The following example does not list all Booleans:
getsebool -a
~]$ getsebool -a
allow_console_login --> off
allow_cvs_read_shadow --> off
allow_daemons_dump_core --> on
Run the
getsebool boolean-name command to only list the status of the boolean-name Boolean:
getsebool allow_console_login
~]$ getsebool allow_console_login
allow_console_login --> off
Use a space-separated list to list multiple Booleans:
getsebool allow_console_login allow_cvs_read_shadow allow_daemons_dump_core
~]$ getsebool allow_console_login allow_cvs_read_shadow allow_daemons_dump_core
allow_console_login --> off
allow_cvs_read_shadow --> off
allow_daemons_dump_core --> on