Skip to Content
Learning RHEL Networking
book

Learning RHEL Networking

by Andrew Mallett
June 2015
Intermediate to advanced
216 pages
4h 48m
English
Packt Publishing
Content preview from Learning RHEL Networking

SELinux tools

Let's take a look at SELinux tools.

chcon and restorecon

Two of the main tools that we can use to help manage SELinux are chcon and restorecon. The chcon command helps to change the SELinux context or TYPE of what will most often be a single or perhaps sometimes a few files that can be referenced easily together with some form of wildcard. The restorecon command can be used to reset a file or directory and its contents to their default SELinux context. These default settings for directories are stored in the /etc/selinux/targeted/contexts/files/file-context file.

With grep, we can search for httpd_sys_content_t, whereas in the output, we should see the default label for files under /var/www. This is the directory were we would expect ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering CentOS 7 Linux Server

Mastering CentOS 7 Linux Server

Mohamed Alibi, BHASKARJYOTI ROY
Troubleshooting CentOS

Troubleshooting CentOS

Jonathan Hobson

Publisher Resources

ISBN: 9781785287831