{"id":19859,"date":"2021-07-19T13:24:36","date_gmt":"2021-07-19T11:24:36","guid":{"rendered":"https:\/\/orcharhino.com\/interesting-selinux-issue-with-post-install-script-in-spec-file-2\/"},"modified":"2026-07-27T15:45:06","modified_gmt":"2026-07-27T13:45:06","slug":"interesting-selinux-issue-with-post-install-script-in-spec-file","status":"publish","type":"post","link":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/","title":{"rendered":"\u201einteresting\u201c SELinux issue with post install script in \u2018.spec\u2019 file"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">My task was pretty straightforward: allow users to download the&nbsp;orcharhino&nbsp;documentation from their&nbsp;orcharhino&nbsp;server.<br>Right now, we\u2019re providing the documentation on each instance at&nbsp;FQDN\/or_doc.<br>As we\u2019ve dropped the&nbsp;.pdf&nbsp;support, we want to provide a&nbsp;.zip&nbsp;archive of the html version documentation at&nbsp;FQDN\/pub\/orcharhino_documentation.zip&nbsp;for users to download.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Easy.<br>Let\u2019s amend the&nbsp;.spec&nbsp;file as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>%post &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/code><br><code>mkdir -p \/var\/www\/html\/pub\/<\/code><br><code>pushd \/usr\/share\/doc\/%{name}\/html\/<\/code><br><code>zip --recurse-paths \/var\/www\/html\/pub\/orcharhino_documentation.zip .<\/code><br><code>popd<\/code><br><code><\/code><\/code><\/pre>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\t\t<div data-elementor-type=\"container\" data-elementor-id=\"30292\" class=\"elementor elementor-30292 elementor-30285\" data-elementor-post-type=\"elementor_library\">\n\t\t\t\t<div class=\"elementor-element elementor-element-34d1a11 e-flex e-con-boxed e-con e-parent\" data-id=\"34d1a11\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-8ef645c e-con-full e-flex e-con e-child\" data-id=\"8ef645c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8a11360 dce_masking-none elementor-widget elementor-widget-image\" data-id=\"8a11360\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/orcharhino.com\/en\/solutions\/digital-sovereignty\/whitepaper-digital-sovereignty-in-the-it-infrastructure\/?utm_medium=blog_in-content_01\">\n\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/orcharhino.com\/wp-content\/smush-webp\/elementor\/thumbs\/img_whitepaper_digital_sovereignty-rk0m3y4axo3zvj0lmoj9wwxvvdg1a89fqno4dft9b0.png.webp\" title=\"img_whitepaper_digital_sovereignty\" alt=\"img_whitepaper_digital_sovereignty\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f84a375 e-con-full e-flex e-con e-child\" data-id=\"f84a375\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e7bb13b elementor-widget elementor-widget-text-editor\" data-id=\"e7bb13b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><strong>Who controls your IT &#8211; you or your dependencies?<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-387deb8 elementor-widget elementor-widget-text-editor\" data-id=\"387deb8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Read the free white paper to find out how to identify critical dependencies, make your infrastructure resilient and regain full control over operations, updates and automation.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5688a81 elementor-widget elementor-widget-text-editor\" data-id=\"5688a81\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p data-start=\"662\" data-end=\"696\"><a href=\"https:\/\/orcharhino.com\/en\/solutions\/digital-sovereignty\/whitepaper-digital-sovereignty-in-the-it-infrastructure\/?utm_medium=blog_in-content_01\" target=\"_blank\" rel=\"noopener\"><strong data-start=\"662\" data-end=\"696\">Download whitepaper now<\/strong><\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Side note: the&nbsp;pushd&nbsp;and&nbsp;popd&nbsp;is necessary because&nbsp;zip&nbsp;does not play nicely with&nbsp;\u2013recurse-paths&nbsp;and&nbsp;\u2013junk-paths&nbsp;together to prevent having the directory structure&nbsp;\/usr\/share\/doc\/%{name}\/html&nbsp;in the&nbsp;zip&nbsp;archive.<br>mkdir&nbsp;and&nbsp;rm&nbsp;are necessary as I don\u2019t know at which stage of the orcharhino installation process the documentation RPM package is actually installed and to make it upgrade safe.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will work, surely.<br>But does it?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigating to my test deployment, I see there is no&nbsp;orcharhino_documentation.zip&nbsp;in \/pub.<br>I&nbsp;ssh&nbsp;into the&nbsp;orcharhino&nbsp;server,&nbsp;cd&nbsp;to&nbsp;\/var\/www\/html\/pub&nbsp;which is symlinked to&nbsp;\/pub&nbsp;, run&nbsp;ls -l&nbsp;et voil\u00e0:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>-rw-r--r--. 1 apache apache 104091 Mar 1 08:49 bootstrap.py<\/code><br><code>-rw-r--r--. 2 apache apache 93821 Mar 1 08:49 bootstrap.pyc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/code><br><code>-rw-r--r--. 2 apache apache 93821 Mar 1 08:49 bootstrap.pyo<\/code><br><code>lrwxrwxrwx. 1 root root 74 Mar 1 11:47 katello-ca-consumer-latest.noarch.rpm -&gt; \/var\/<\/code><br><code>-rw-r--r--. 1 root root 8873 Mar 1 11:47 katello-ca-consumer-&nbsp;<\/code><code><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;orcharhino.example.com-1.0-1.noarch.rpm<\/code><br><code>-rw-r--r--. 1 root root 9324 Mar 1 11:47 katello-ca-consumer-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;orcharhino.example.com-1.0-1.src.rpm<\/code><br><code>-rwxr-xr-x. 1 root root 21761 Mar 1 11:47 katello-rhsm-consumer<\/code><br><code>-rw-r--r--. 1 root root 8123 Mar 1 11:45 katello-server-ca.crt<\/code><br><code>-rw-r--r--. 1 root root 32720742 Mar 1 15:55 orcharhino_documentation.zip<\/code><br><code>-rw-r--r--. 1 root root 1670 Mar 1 12:10 pulp_deb_signing.key<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To my surprise, the file&nbsp;<em>is<\/em>&nbsp;there.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I stare at the&nbsp;ls&nbsp;output for a good 20 minutes.<br>How can I see this file here, but neither in the browser nor using&nbsp;wget?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I ask a colleague and we stare at it some more, probably longer than we\u2019re both comfortable to admit.<br>My colleague searches the httpd config files, I reload the page in my browser over and over and&nbsp;tail -f&nbsp;the various&nbsp;httpd&nbsp;log files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">tail -f \/var\/log\/httpd\/foreman_error.log&nbsp;finally brings some light into the darkness:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>&#091;Mon Mar 01 16:29:06.561442 2021] &#091;core:error] &#091;pid 16455] (13)Permission denied: &#091;client<\/code><br><code>12.34.56.78:52509] AH00035: access to \/pub\/orcharhino_documentation.zip denied (filesystem path '\/<\/code><br><code>var\/www\/html\/pub\/orcharhino_documentation.zip') because search permissions are missing on a<\/code><br><code>component of the path<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">something something BECAUSE PERMISSIONS<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using my favourite search engine, I quickly discover that it\u2019s an SELinux issue.<br>From what I understand, SELinux limited access to the&nbsp;\/var\/www\/html\/pub\/orcharhino_documentation.zip&nbsp;&nbsp;archive due to a missing SELinux context.<br>Running a simple&nbsp;restorecon orcharhino_documentation.zip&nbsp;restores the SELinux context and fixes my problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I add this to the .spec&nbsp;file and restart the test deployment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">hashtag surprises during \u201etrivial\u201c tickets and&nbsp;orcharhino&nbsp;development<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My task was pretty straightforward: allow users to download the&nbsp;orcharhino&nbsp;documentation from their&nbsp;orcharhino&nbsp;server.Right now, we\u2019re providing the documentation on each instance at&nbsp;FQDN\/or_doc.As we\u2019ve dropped the&nbsp;.pdf&nbsp;support, we want to provide a&nbsp;.zip&nbsp;archive of the html version documentation at&nbsp;FQDN\/pub\/orcharhino_documentation.zip&nbsp;for users to download. Easy.Let\u2019s amend the&nbsp;.spec&nbsp;file as follows: Side note: the&nbsp;pushd&nbsp;and&nbsp;popd&nbsp;is necessary because&nbsp;zip&nbsp;does not play nicely with&nbsp;\u2013recurse-paths&nbsp;and&nbsp;\u2013junk-paths&nbsp;together to prevent having [&hellip;]<\/p>\n","protected":false},"author":1095,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[104],"tags":[],"pillars":[],"rolle":[],"use-case-kategorie":[],"class_list":["post-19859","post","type-post","status-publish","format-standard","hentry","category-blog-en"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.7 (Yoast SEO v28.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SELinux Permission Denied in RPM %post Script - orcharhino<\/title>\n<meta name=\"description\" content=\"An RPM %post script created the file, but Apache still returned Permission denied. See how a missing SELinux context caused it and how restorecon fixes it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u201einteresting\u201c SELinux issue with post install script in \u2018.spec\u2019 file\" \/>\n<meta property=\"og:description\" content=\"An RPM %post script created the file, but Apache still returned Permission denied. See how a missing SELinux context caused it and how restorecon fixes it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/\" \/>\n<meta property=\"og:site_name\" content=\"orcharhino\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ATIXDE\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-19T11:24:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-27T13:45:06+00:00\" \/>\n<meta name=\"author\" content=\"Dev Medienstuermer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@orcharhino\" \/>\n<meta name=\"twitter:site\" content=\"@orcharhino\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dev Medienstuermer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/resources\\\/blog\\\/interesting-selinux-issue-with-post-install-script-in-spec-file\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/resources\\\/blog\\\/interesting-selinux-issue-with-post-install-script-in-spec-file\\\/\"},\"author\":{\"name\":\"Dev Medienstuermer\",\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/#\\\/schema\\\/person\\\/7d02c0c1f109e932aec93630ecf98238\"},\"headline\":\"\u201einteresting\u201c SELinux issue with post install script in \u2018.spec\u2019 file\",\"datePublished\":\"2021-07-19T11:24:36+00:00\",\"dateModified\":\"2026-07-27T13:45:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/resources\\\/blog\\\/interesting-selinux-issue-with-post-install-script-in-spec-file\\\/\"},\"wordCount\":417,\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/resources\\\/blog\\\/interesting-selinux-issue-with-post-install-script-in-spec-file\\\/\",\"url\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/resources\\\/blog\\\/interesting-selinux-issue-with-post-install-script-in-spec-file\\\/\",\"name\":\"SELinux Permission Denied in RPM %post Script - orcharhino\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/#website\"},\"datePublished\":\"2021-07-19T11:24:36+00:00\",\"dateModified\":\"2026-07-27T13:45:06+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/#\\\/schema\\\/person\\\/7d02c0c1f109e932aec93630ecf98238\"},\"description\":\"An RPM %post script created the file, but Apache still returned Permission denied. See how a missing SELinux context caused it and how restorecon fixes it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/resources\\\/blog\\\/interesting-selinux-issue-with-post-install-script-in-spec-file\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/orcharhino.com\\\/en\\\/resources\\\/blog\\\/interesting-selinux-issue-with-post-install-script-in-spec-file\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/resources\\\/blog\\\/interesting-selinux-issue-with-post-install-script-in-spec-file\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Start\",\"item\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u201einteresting\u201c SELinux issue with post install script in \u2018.spec\u2019 file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/\",\"name\":\"orcharhino\",\"description\":\"one tool to rule them all\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/#\\\/schema\\\/person\\\/7d02c0c1f109e932aec93630ecf98238\",\"name\":\"Dev Medienstuermer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a23619ea28283064311a0d1fe283044ac4eecabc19235c5c77dc62e2c5565de4?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a23619ea28283064311a0d1fe283044ac4eecabc19235c5c77dc62e2c5565de4?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a23619ea28283064311a0d1fe283044ac4eecabc19235c5c77dc62e2c5565de4?s=96&d=blank&r=g\",\"caption\":\"Dev Medienstuermer\"},\"url\":\"https:\\\/\\\/orcharhino.com\\\/en\\\/ressourcen\\\/blog\\\/author\\\/dev\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SELinux Permission Denied in RPM %post Script - orcharhino","description":"An RPM %post script created the file, but Apache still returned Permission denied. See how a missing SELinux context caused it and how restorecon fixes it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/","og_locale":"en_US","og_type":"article","og_title":"\u201einteresting\u201c SELinux issue with post install script in \u2018.spec\u2019 file","og_description":"An RPM %post script created the file, but Apache still returned Permission denied. See how a missing SELinux context caused it and how restorecon fixes it.","og_url":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/","og_site_name":"orcharhino","article_publisher":"https:\/\/www.facebook.com\/ATIXDE\/","article_published_time":"2021-07-19T11:24:36+00:00","article_modified_time":"2026-07-27T13:45:06+00:00","author":"Dev Medienstuermer","twitter_card":"summary_large_image","twitter_creator":"@orcharhino","twitter_site":"@orcharhino","twitter_misc":{"Written by":"Dev Medienstuermer","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/#article","isPartOf":{"@id":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/"},"author":{"name":"Dev Medienstuermer","@id":"https:\/\/orcharhino.com\/en\/#\/schema\/person\/7d02c0c1f109e932aec93630ecf98238"},"headline":"\u201einteresting\u201c SELinux issue with post install script in \u2018.spec\u2019 file","datePublished":"2021-07-19T11:24:36+00:00","dateModified":"2026-07-27T13:45:06+00:00","mainEntityOfPage":{"@id":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/"},"wordCount":417,"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/","url":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/","name":"SELinux Permission Denied in RPM %post Script - orcharhino","isPartOf":{"@id":"https:\/\/orcharhino.com\/en\/#website"},"datePublished":"2021-07-19T11:24:36+00:00","dateModified":"2026-07-27T13:45:06+00:00","author":{"@id":"https:\/\/orcharhino.com\/en\/#\/schema\/person\/7d02c0c1f109e932aec93630ecf98238"},"description":"An RPM %post script created the file, but Apache still returned Permission denied. See how a missing SELinux context caused it and how restorecon fixes it.","breadcrumb":{"@id":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/orcharhino.com\/en\/resources\/blog\/interesting-selinux-issue-with-post-install-script-in-spec-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Start","item":"https:\/\/orcharhino.com\/en\/"},{"@type":"ListItem","position":2,"name":"\u201einteresting\u201c SELinux issue with post install script in \u2018.spec\u2019 file"}]},{"@type":"WebSite","@id":"https:\/\/orcharhino.com\/en\/#website","url":"https:\/\/orcharhino.com\/en\/","name":"orcharhino","description":"one tool to rule them all","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/orcharhino.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/orcharhino.com\/en\/#\/schema\/person\/7d02c0c1f109e932aec93630ecf98238","name":"Dev Medienstuermer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a23619ea28283064311a0d1fe283044ac4eecabc19235c5c77dc62e2c5565de4?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a23619ea28283064311a0d1fe283044ac4eecabc19235c5c77dc62e2c5565de4?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a23619ea28283064311a0d1fe283044ac4eecabc19235c5c77dc62e2c5565de4?s=96&d=blank&r=g","caption":"Dev Medienstuermer"},"url":"https:\/\/orcharhino.com\/en\/ressourcen\/blog\/author\/dev\/"}]}},"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/posts\/19859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/users\/1095"}],"replies":[{"embeddable":true,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/comments?post=19859"}],"version-history":[{"count":3,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/posts\/19859\/revisions"}],"predecessor-version":[{"id":30328,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/posts\/19859\/revisions\/30328"}],"wp:attachment":[{"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/media?parent=19859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/categories?post=19859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/tags?post=19859"},{"taxonomy":"pillars","embeddable":true,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/pillars?post=19859"},{"taxonomy":"rolle","embeddable":true,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/rolle?post=19859"},{"taxonomy":"use-case-kategorie","embeddable":true,"href":"https:\/\/orcharhino.com\/en\/wp-json\/wp\/v2\/use-case-kategorie?post=19859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}