Ravi Sir's Cards › AWS
chcon vs semanage fcontext
This comparison card contrasts chcon and semanage fcontext. chcon: Temporary label. semanage fcontext is described as persistent rule. The card pairs chcon with quick test, and semanage fcontext with exams and production.
Read card text
What this card says
SELinux
chcon
Temporary label.
semanage fcontext
Persistent rule.
Key points
Lost on relabel.
Applied by restorecon.
Example
chcon -t httpd_sys_content_t f
Use when
Quick test.
Exams and production.