Difference between revisions of "SElinux notes"

From Wiki
Jump to: navigation, search
(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…')
 
Line 9: Line 9:
 
  restorecon -RFvv /www
 
  restorecon -RFvv /www
  
You can also temporarily change context using the **chcon** command.
+
You can also temporarily change context using the '''chcon''' command.
  
 
  chcon --reference=/root/ -R /www
 
  chcon --reference=/root/ -R /www

Revision as of 13:59, 14 October 2014

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