HA on Docker Issue - Permission denied: '/config/deps' - I tried many things already

Hi Everyone

I am moving away from years of HA Core in Python Venv and trying the Container with Docker in my Fedora Linux.

I am facing this issue when trying to start the container for the first time:

services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
Fatal Error: Unable to create library directory /config/deps: [Errno 13] Permission denied: '/config/deps'

I found some articles here in the forum and I tried all of them with no success.

  • I am logged in as root (not sudo, not su, root itself).
  • I made sure my /hass and /hass/config are root:root and 777

but the error persist.

This is what I made:

mkdir /hass/config
chown root:root -R /hass/

Docker installation:

docker run -d --name homeassistant --restart=unless-stopped -e TZ=America/New_York -v /hass/config:/config --network=host ghcr.io/home-assistant/home-assistant:stable

After the startup I see this log and the machine keeps restarting

Any help is very very welcome :slight_smile:

s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
Fatal Error: Unable to create library directory /config/deps: [Errno 13] Permission denied: '/config/deps'
[18:51:22] INFO: e[32mHome Assistant Core finish process exit code 1e[0m
[18:51:22] INFO: e[32mHome Assistant Core service shutdowne[0m
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
Fatal Error: Unable to create library directory /config/deps: [Errno 13] Permission denied: '/config/deps'
[18:51:28] INFO: e[32mHome Assistant Core finish process exit code 1e[0m
[18:51:28] INFO: e[32mHome Assistant Core service shutdowne[0m
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Just to double check, mind showing us the output of “ls -ld config config/deps” ? And also try a “touch config/deps/foo” on the host to check that should work too.

Meanwhile I run --privileged but I have forgotten why. As a quick test for you, no harm.

docker run | Docker Documentation)

Probably to access hardware but this is not needed i believe. I dont run privileged but only hardware is zwave dongle

You must have correct permission on folders and files in the folder. I created a “homeassistant” user and group (1002) on my host linux system with no login or home directory. I then created the HA container using environment variables PUID:1002 and GUID:1002

All this is bot needed but likely the user permission of the files are wrong after moving from venv. Also you may havr some extra files used by venv.

You could create container and just point to empty folder and allow it to create it so you know
Correct user/groups to assign to your files