From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Maintain security context when managing files
From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security
Maintain security context when managing files
- [Instructor] By default, when you copy a file to a new location, it inherits the security context of the directory it's in according to the security policy. If you copy a file to /home, the type will be user_home_der_T. If however, you want to keep the original security context of the file, you will need to provide additional options to commands. If you copy a file, you may want to provide the -a option. - a is for archive and preserves permissions, access control lists, extended attributes, And SELinux security context. The move command preserves attributes by default because it just moves the files and doesn't change their metadata. When you want to back up your system using tar, you'll want to pass the --selinux option to preserve security context. To copy files from one host to another while Preserving security context, use rsync with the dash capital X option. Be careful with these commands. Preserving security context may not be what you want. The safe option would be to copy…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Set enforcing and permissive modes for SELinux5m 13s
-
List and identify SELinux file and process context3m 28s
-
Restore SELinux default file contexts4m 11s
-
Use Booleans to modify SELinux behavior2m 33s
-
Diagnose routine SELinux policy violations6m 57s
-
Maintain security context when managing files1m 6s
-
Manage firewalls with firewalld2m 58s
-
Challenge: Manage security3m 55s
-
Solution: Manage security6m 18s
-
-
-
-
-