From the course: Linux: Storage Systems

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: SELinux

Solution: SELinux

(techno music) - [Instructor] Let's look at what we're talking about with the selinux contact stuff. So we're going to be working with the file etc/motd and we're going to use that path a few times. So let's just put it in a shell variable to save a little effort. So let's first see here what the context is, and it says it's an etc_t. So we're going to change that and then we're going to put that back. Right now we are in the etc/selinux/targeted/context/files directory. Let's remember that directory in another variable. Let's make a directory where we can make a backup of this. Good enough. Let's make a copy of our current directory there. Oh, got to do that recursive. There we go. Now let's change the configuration for the context for that file and we'll pick another context. We'll say bin_t. I had already had an entry for that, so we got it. That's okay. Let's check the context again. Notice it hasn't changed, it's still etc_t. We changed the config files, but we haven't told it to…

Contents