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.
Restore default SELinux file contexts - Linux Tutorial
From the course: Linux: Storage Systems
Restore default SELinux file contexts
- [Instructor] Now let's talk a little bit about security-related things for file systems and files. And one of those is SELinux. And SELinux is on some Linux distros, an alternative similar as AppArmor, which is on different distros. SELinux uses what it calls file context, and you can list the context with the minus z or zed option. So what happens is, first of all, the ordinary permissions are checked, and then after that, the additional SELinux context are checked to see if something is permitted. For example, your web server is typically only allowed to serve files that have certain contexts. So that if say there's a bug in it, then it won't serve up other system files. So there's commands having to do with this context. You can change the context on a file. Here, we're changing, setting this context on this file here. Restorecon will set back the defaults. And in the directory etc/selinux/targeted/contexts/files, there are a bunch of these context files to specify what the…
Contents
-
-
-
-
-
(Locked)
Restore default SELinux file contexts3m 41s
-
(Locked)
Working with AppArmor2m 59s
-
(Locked)
Configure encrypted partitions2m 39s
-
(Locked)
Manage file system access control lists3m 10s
-
(Locked)
File permission problems3m 24s
-
(Locked)
File permissions demo1m 20s
-
(Locked)
Using SUID, attributes, and read-only5m 10s
-
(Locked)
Challenge: SELinux, LUKS, ACLs1m 35s
-
(Locked)
Solution: SELinux3m 14s
-
(Locked)
Solution: LUKS3m 6s
-
(Locked)
Solution: ACLs1m 41s
-
(Locked)
-
-
-