SOLVED - Home assistant 2024.10 on Docker with Hacs/Nordpool gives permission errors

I’ve been having a problem with my Nordpool-integration for a while now, and finally found the problem but not the solution.

After upgrading to 2024.10 I get permission denied when HA is setting up the nordpool-integration. From the log

2024-11-05 17:00:35.343 INFO (SyncWorker_4) [homeassistant.util.package] Attempting install of nordpool==0.4.2
2024-11-05 17:00:47.495 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package nordpool==0.4.2: error: Failed to install: nordpool-0.4.2-py3-none-any.whl (nordpool==0.4.2)
  Caused by: failed to create directory `/usr/local/lib/python3.12/site-packages/nordpool-0.4.2.dist-info`

It seems that in 2024.10 it tries to isntall python modules as the user running home assistant, instead of root.

If I exec into the container, change ownership of /usr/local/lib/python3.12 and restart HA it works, but only until I upgrade the container next time (to 2024.10.1 for example):

chown -R homeassistant:homeassistant /usr/local/lib/python3.12/

If I revert back to 2024.9.3 it works out of the box. From the log:

2024-11-05 17:04:31.849 INFO (SyncWorker_2) [homeassistant.util.package] Attempting install of nordpool==0.4.2
2024-11-05 17:06:27.494 INFO (MainThread) [homeassistant.setup] Setting up nordpool
2024-11-05 17:06:28.543 INFO (MainThread) [homeassistant.setup] Setup of domain nordpool took 1.05 seconds

I’ve checked the changelog for 2024.10 but can’t find anything that would explain the above?

Please note that nothing else is changed in the setup, Hacs and Nordpool remain on the same versions, and I am running Home assistant as the user “homeassistant” not root in all cases.

It doesn’t even seem to be related to Nordpool but any integration that tries to install a python module, it just happens to be Nordpool in my case.

Any ideas?

I am having similar issues with both the Life360 and the MusicAssistant HACS components. I am running HA in docker without HAOS. Also started with the 2024.10 build and reverting back to 2024.9.3 works. I haven’t had time to troubleshoot until now, so have been upgrading to each of the 2024.10 builds as they have become available, then have just reverted when it still doesn’t work

Good to know I wasn’t alone, this has proven a tough issue to google a solution for.

However, it seems I solved it for me at least.

I had the following configuration in my docker-compose.yaml

    volumes:
      - '/home/hass/config:/config'
      - '/home/hass/config/docker/run:/etc/services.d/home-assistant/run'

Note the last line, where the file run inside the container is replaced by one in my config directory.
I have no idea where that came from, but it has been there for a long time.
Current documentation for setting up HA on Docker does not mention it, so it probably is something legacy.
I commented out that line and now 2024.10.4 starts up just fine.

1 Like

Thank you! I had that same line and removing it fixed it for me as well