From the course: Linux: Storage Systems

Unlock the full course today

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

Restore default SELinux file contexts

Restore default SELinux file contexts - Linux Tutorial

From the course: Linux: Storage Systems

Start my 1-month free trial

Restore default SELinux file contexts

- [Instructor] SELinux File Contexts. So associated with files, when you're using SELinux, is the context that the kernel uses, to check for permissions. You can see the context, with the capital Z, or capital Zed, option, the LS. The way it works in the kernel is, it checks regular permissions, the typical read/write/execute sort of stuff. And it checks extra stuff, based on these contexts. So this is going on in the kernel, in fact, pretty much every system call on the kernel, has a hook in it, to do extra checks. So one of the great benefits of this, is a service, like a web server, can check the context on a file, or a kernel can enforce that, to prevent the web server from serving files it's not supposed to serve, for example. So if someone, say, tried to get your web server to serve up your password file, it wouldn't be able to do it, because of these sort of checks. So, you sometimes need to adjust these, so that, for example, this web server can serve up a page. If you just…

Contents