Heimdall has issues with permissions - help?!

  • Hey,


    I have a problem. I am using Heimdall for my system to move from there to the other services easily. I have it running on port 80 and omv on port 81. I tried to set it up close to the example in docker compose and added the pieces described in the omv-extras documentation. After some time (maybe 2-3 days) when I try to access heimdall i get "500 | Server Error" page. I added the environment variable to enable debug to get a better info on why that happens. It seems I have permission problems. I have redone the setup 2 times from the example and it fails everytime.


    So... Can someone help/guide me to fix my problem? Down below are outputs from certain parts of the plugin and the system.


  • change permission of ${PATH_TO_APPDATA}/heimdall so user 1001 and group 100 have permission, actually is root=0




    eg; cd PATH_TO_APPDATA/heimdall <- use apropiate path


    chown youruser:users heimdall or something simmilar and check with ls -la to see the change



    PD: sometimes down the container to be sure is not running, then deleting the /heimdall folde rand then Up the container, solve the problem because container in start, create apropiate folders with apropiate permission. but if folder exist previosly, the start do not create folder, simply try to use it and fail because bad owner.

  • I am not sure if that is the correct answer. I actually did that some time ago and it seemed to work at first. BUT that folder is the root for the heimdall appdata and it looks the same as with calibre-web and jellyfin - they work fine. Additionally it's the permission that is default set from compose plugin and it gets set whenever the saltstack files are being run again (at least that's what I understand from here).


    Code
    appdata# ll
    total 16
    drwx------ 2 root root 4096 Mar 30 12:08 calibre-web
    -rw------- 1 root root 1145 Apr  2 22:24 global.env
    drwx------ 7 root root 4096 Apr  3 22:51 heimdall
    drwx------ 3 root root 4096 Mar 11 11:04 jellyfin
  • Code
    volumes:
      - ${PATH_TO_APPDATA}/heimdall:/config

    Additionally it's the permission that is default set from compose plugin

    Is your heimdall directory in appdata? I mean the directory where the compose file is located.


    It should actually be placed in the data directory.

    OMV 7.x | 6.8 Proxmox Kernel

    GIGABYTE Z370M DS3H Motherboard

    Intel G4560 CPU | 16G×1 Non-ECC RAM

    128G SSD + 1T SSD + 4T×2 HDD | No RAID

    500W ATX PSU | APC BK650-CH UPS

  • Is your heimdall directory in appdata? I mean the directory where the compose file is located.


    It should actually be placed in the data directory.

    Yes. It's in appdata as seen in the tree command. I used the same way of creating that as it's described in omv-extras example on how to configure jellyfin. There it's also put in the appdata folder. Both my calibre-web and the config from jellyfin are setup the same way and they work without a problem.


    I don't get it...


  • Yes. It's in appdata as seen in the tree command. I used the same way of creating that as it's described in omv-extras example on how to configure jellyfin. There it's also put in the appdata folder. Both my calibre-web and the config from jellyfin are setup the same way and they work without a problem.


    I don't get it...

    It's a bit strange. Normally, it should work if it's placed in appdata as well.


    Try this:

    Code
    volumes:
      - ${PATH_TO_APPDATA}/heimdall/config:/config

    Like your jellyfin compose file:

    Code
    volumes:
      - ${PATH_TO_APPDATA}/jellyfin/library:/config

    Since the heimdall folder is created by the Compose plugin with the default permission of root:root, it should work normally if the container automatically creates a folder with specified permissions inside it.


    Code
    volumes:
      - ${PATH_TO_APPDATA}/calibre-web:/config

    However, I don't quite understand why your calibre-web is working fine, lol.

    In the example on Docker Hub, It should be written like this:

    Code
    volumes:
      - ${PATH_TO_APPDATA}/calibre-web/data:/config

    OMV 7.x | 6.8 Proxmox Kernel

    GIGABYTE Z370M DS3H Motherboard

    Intel G4560 CPU | 16G×1 Non-ECC RAM

    128G SSD + 1T SSD + 4T×2 HDD | No RAID

    500W ATX PSU | APC BK650-CH UPS

    Edited once, last by Zafkiel ().

  • Well, to top it off I just had my brother send me screenshots of how I have configured his OMV install and the heimdall container. Exactly the same compose file and all the folders have exactly the same permissions - he has no error...


    I used the calibre-web example from the plugin where it is defined similar.

  • You have (at least) a file with wrong permission:

    [-rw-r----- root ] heimdall/log/logrotate.status


    ALL files under heimdall folder need to belong to PUID:PGID of the owner of the container:
    Is the owner of the files the same as your PUID from the YML?



    My case is PUID=pi (1000) ; PGID=users (100)

  • PUID and PGID are for my user appuser and have correct setting (as fas as I know).

    Code: from global env
    APPUSER_PUID=1001
    APPUSER_PGID=100

    The logrotate.status file gets created at some point after the container is running, probably when the service encounters the error. I have reset and deleted everything before and did not change any permissions for files.


    I will try and have a subfolder /config in the appdata/heimdal directory. Maybe that helps in this case. I will report back in a few days if that worked. I tried a bit with a second heimdall container and forgot to accept changes in the yellow bar. The heimdall directory then was not owned by root but appuser. I did not see the yellow bar and could not apply changes after. Might be that a subfolder like /config is required for the heimdall image.

  • It seems to be working. Thanks everyone for the input and help!


    So for anyone having the same problem: Don't have the volume for heimdall config directly in the base appdata directory for heimdall. Do it like the following and it will work.


    Code
        volumes:
          - ${PATH_TO_APPDATA}/heimdall/config:/config

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!