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 23,300 courses taught by industry experts.
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
-
(Locked)
List and identify SELinux file and process context3m 28s
-
(Locked)
Restore SELinux default file contexts4m 11s
-
(Locked)
Use Booleans to modify SELinux behavior2m 33s
-
(Locked)
Diagnose routine SELinux policy violations6m 57s
-
(Locked)
Maintain security context when managing files1m 6s
-
(Locked)
Manage firewalls with firewalld2m 58s
-
(Locked)
Challenge: Manage security3m 55s
-
(Locked)
Solution: Manage security6m 18s
-
-
-
-
-