linux_wiki:restore_default_file_contexts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:restore_default_file_contexts [2016/02/29 22:18]
billdozor
linux_wiki:restore_default_file_contexts [2019/05/25 23:50] (current)
Line 3: Line 3:
 **General Information** **General Information**
  
-About this page/how-to/script+Contexts are defined in a policy and then restored from policy to files
  
 ---- ----
 +
 +===== Restoring Labels =====
  
 Restore file's default selinux context Restore file's default selinux context
Line 21: Line 23:
 ---- ----
  
-==== Create Context Labels for New Directories ====+===== Create Context Labels for New Directories =====
  
 **Method 1**: Find a usable context type and create it. **Method 1**: Find a usable context type and create it.
Line 42: Line 44:
 </code> </code>
  
 +\\
 **Once context label rules are defined, they need to be restored to the directory** **Once context label rules are defined, they need to be restored to the directory**
  
Line 51: Line 54:
  
 \\ \\
-Delete Defined Context Rule+Delete Defined Context Rule (if you made a mistake creating it)
 <code bash> <code bash>
 semanage fcontext -d "/website(/.*)?" semanage fcontext -d "/website(/.*)?"
  • linux_wiki/restore_default_file_contexts.1456802314.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)