SElinux notes

From Wiki
Revision as of 13:56, 14 October 2014 by Admin (Talk | contribs) (Created page with 'Relabel the file system: touch /.autorelabel reboot Update security policy for a directory: semanage fcontext -a -f "" -t httpd_sys_content_t '/www(/.*)?' restorecon -RFvv…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Relabel the file system:

touch /.autorelabel
reboot

Update security policy for a directory:

semanage fcontext -a -f "" -t httpd_sys_content_t '/www(/.*)?'
restorecon -RFvv /www

You can also temporarily change context using the **chcon** command.

chcon --reference=/root/ -R /www