How to set a specific SELinux context for the content of a directory different than the the context of the directory itself?
Issue
-We need all ".ssh" directories located in the /home of all users to have "ssh_home_t" context.
-All of the files inside of those ".ssh" directories should not have "ssh_home_t", except the files named "authorized_keys".
-All files (including new ones) inside ".ssh" should have "default_t" instead.
Environment
Red Hat Enterprise Linux
SELinux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.