Mkdir Permission Denied

Hi,
I’m running RHEL8 with OOD 3.1.10

After adding a custom logo in the footer I get the following error:

App 329361 output: [2025-03-03 17:19:27 +0000 ] INFO “method=GET path=/pun/sys/dashboard/500 format=html controller=ErrorsController action=internal_server_error status=500 error=‘ActionView::Template::Error: Permission denied @ dir_s_mkdir - /ood/www/apps/sys/dashboard/tmp/cache/assets’ allocations=13170 duration=12.64 view=0.00”
App 329361 output: Error during failsafe response: Permission denied @ dir_s_mkdir - /ood/www/apps/sys/dashboard/tmp/cache/assets

The folder already exists and the user accessing the dashboard belongs to the UX group, which has full permissions on the folder /ood/www/apps/sys/dashboard/tmp.

Hey sorry for the issue. Looking at the path in this error message I noticed something seems off with this path of /ood/www/apps/sys/dashboard/tmp/cache/assets as it has the root coming out of /ood and not /www which is what I would expect.

I’m really not sure what this could be given the info though. What changes did you make to which files? What are the actual permissions and ownership of the file that is being accessed?

Hi,

the added file is the following:
/ood/etc/config/apps/dashboard/views/layouts/_footer.html.erb

The file _footer.html.erb has the following permissions:

-rw-r--r--. 1 root root 477 Mar 4 14:07 _footer.html.erb

Regarding its content:

<footer class="d-flex m-0 mt-4 justify-content-between align-items-center p-4">
  <div class="d-flex align-items-center">
    <%= link_to "URL", target: "_blank", class: "me-3" do %>
      <%= image_tag(
            "custom_image.svg",
            class: "footer-logo",
            alt: "",
            height: "40px"
          ) %>
    <% end %>
  </div>
  <span>OnDemand version: <%= Configuration.ood_version %></span>
</footer>

with custom_image.svg in /ood/www/apps/sys/dashboard/app/assets/images/

Meanwhile, the /ood/www/apps/sys/dashboard/tmp folder has the following (recursive) permissions:

drwxr-xr-x.   3 root on-demand    51 Mar 4 15:12 tmp

where on-demand is a system group that includes the users who need to access the dashboard.

Thanks a lot for your support!

Thanks for providing all this. Just one last question, what are the permissions on that custom_image.svg in that images directory?

The issue is the way rails builds the asset pipeline here. You are referencing an asset using the rails asset pipeline but rails is not serving this right do to how it precompiles the assets.

What you should do here is place the image in /public and then reference it there as /custom_image.svg, this will avoid the asset pipeline issue.

Hi Travert,
Thank you for your reply.

The custom_image.svg has the following:

-rw-r--r--. 1 root root 477 Mar 4 14:07 custom_image.svg

as the original OpenOnDemand_powered_by_RGB.svg in the same directory.

In which /public directory do you suggest I upload the image?
The one in /ood/www/apps/sys/dashboard/ or the one in /ood/www/?

Thanks!

This would be the /var/www/ood/public directory or what looks like /ood/www/public for your setup.