{"id":569,"date":"2020-08-13T19:09:48","date_gmt":"2020-08-13T19:09:48","guid":{"rendered":"http:\/\/www.ishygddt.xyz.\/~blog\/?p=569"},"modified":"2022-03-08T19:08:09","modified_gmt":"2022-03-08T19:08:09","slug":"selinux-allow-httpd-access-to-folder","status":"publish","type":"post","link":"http:\/\/www.ishygddt.xyz\/~blog\/2020\/08\/selinux-allow-httpd-access-to-folder","title":{"rendered":"selinux allow httpd access to folder"},"content":{"rendered":"<p>If, for instance, you are serving the internet stuff at <code class=\"\" data-line=\"\">\/srv\/stuff\/TehInternetz<\/code> instead of (or in addition to) the default <code class=\"\" data-line=\"\">\/var\/www<\/code>, and selinux is preventing Apache\/NGINX from accessing the files, run the following:<\/p>\n<pre><code class=\"language-shell\" data-line=\"\">dnf install policycoreutils-python-utils || yum install policycoreutils-python || apt install semanage-utils\nsemanage fcontext -a -e \/var\/www \/srv\/stuff\/TehInternetz\nrestorecon -R -v \/srv\/stuff\/TehInternetz<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If, for instance, you are serving the internet stuff at \/srv\/stuff\/TehInternetz instead of (or in addition to) the default \/var\/www, and selinux is preventing Apache\/NGINX from accessing the files, run the following: dnf install policycoreutils-python-utils || yum install policycoreutils-python || apt install semanage-utils semanage fcontext -a -e \/var\/www \/srv\/stuff\/TehInternetz restorecon -R -v \/srv\/stuff\/TehInternetz<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[30],"class_list":["post-569","post","type-post","status-publish","format-standard","hentry","category-howto","tag-selinux"],"_links":{"self":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/comments?post=569"}],"version-history":[{"count":2,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/569\/revisions"}],"predecessor-version":[{"id":703,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/569\/revisions\/703"}],"wp:attachment":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/media?parent=569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/categories?post=569"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/tags?post=569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}