Using semanage for context management

The semanage command writes the new context to the SELinux policy, which is used to apply the file context at the relabeling of the file labels or while setting the default file context using restorecon. It uses an extended regular expression to specify the path and filenames for applying those rules (new file context). The most commonly used extended regular expression with semanage fcontext is (/.*)?. This expression matches the directory listed before the expression and everything in that directory recursively.

An example of semanage command usage is shown in the following diagram:

The semange command is a part of the policycoreutil-python package. In order to use the semanage command, make sure this package is installed in the system.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.104.120