Mark Hamrick
Mark Hamrick
System Admin Mathematics and Statistics

Contact Me

Phone:704-687-0682
Email: M.Hamrick@uncc.edu

Links

  • Dept Site

SELinux – Simple Context

November 12, 2014 by Marshall Hamrick
Categories: Updates

For several years now, I have rebelled against the standard advice in the RH/CentOS world of just setting SELinux to off. However, there are times when leaving it on gets complicated.

Case in point is that I share repos from a RAIDed drive via the web. SELinux will block this from occuring until the context is set on the shared directories. The first command defines the context for the directory.

semanage fcontext -a -t httpd_sys_ra_content_t “/your/share(/.*)?”

This does not apply the context however, so a restorecon has to be run.

restorecon -Rv /your/share

After this is completed on the directories, I do a reboot.

Skip to toolbar
  • Log In