
{"id":97,"date":"2014-11-12T17:45:24","date_gmt":"2014-11-12T17:45:24","guid":{"rendered":"http:\/\/pages.charlotte.edu\/mark-hamrick\/?p=97"},"modified":"2014-11-12T17:45:24","modified_gmt":"2014-11-12T17:45:24","slug":"selinux-simple-context","status":"publish","type":"post","link":"https:\/\/pages.charlotte.edu\/mark-hamrick\/blog\/2014\/11\/12\/selinux-simple-context\/","title":{"rendered":"SELinux &#8211; Simple Context"},"content":{"rendered":"<p>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.<\/p>\n<p>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.<\/p>\n<p style=\"padding-left: 30px\">semanage fcontext -a -t httpd_sys_ra_content_t &#8220;\/your\/share(\/.*)?&#8221;<\/p>\n<p>This does not apply the context however, so a restorecon has to be run.<\/p>\n<p style=\"padding-left: 30px\">restorecon -Rv \/your\/share<\/p>\n<p>After this is completed on the directories, I do a reboot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-updates"],"_links":{"self":[{"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":1,"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":98,"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/posts\/97\/revisions\/98"}],"wp:attachment":[{"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pages.charlotte.edu\/mark-hamrick\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}