From the course: Learning CentOS Linux

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with SELinux

Working with SELinux

From the course: Learning CentOS Linux

Start my 1-month free trial

Working with SELinux

- [Instructor] There's a few commands you'll use when working with SELinux. First, there's setenforce. Setenforce sets whether the enforcing or permissive mode is active. As we saw before, my system is set to enforcing. With the command setenforce zero, I can set it to permissive. And I can set it back to enforcing with setenforce one. This change only persists until the system is rebooted. So to make a permanent change, you need to edit the etc sysconfig SELinux file. To do that, I'll write vi etc sysconfig SELinux. This SELinux line here is where you set the state permanently. I'll leave mine on enforcing and it's a good idea to leave SELINUXTYPE set to targeted. There's two commands I'll use later in the course to work with security context. Chcon, which changes the context of files and folders, which we'll see in the web service video, and setsebool, which I'll use in the file sharing video to change a Boolean value. If things aren't working the way you expect them too, it's a…

Contents