Chapter 7
- The unit files in
/usr/lib/systemd/system
are managed by the Linux distribution itself. Whenever a new update to the software is deployed on the system, these files are overwritten.Modifications to unit files should be placed in
/etc/systemd/system
instead, as they overrule the settings in/usr/lib/systemd
, and software deployments should not place any of their unit files in that location. - The application is tmpfiles, and is part of the systemd suite. To have it reset a context, a configuration file has to be created (in
/etc/tmpfiles.d
for locally defined changes) and use thez
directive (to reset the context of a single file) or theZ
directive (to recursively set the context of an entire directory). - The
journalctl
command allows filtering on variables that it obtained from the event itself. One of these variables is the SELinux context of the service that generated the event.To filter on a particular value, you use the variable name as an argument to the
journalctl...