[Fixed]-Errno 13 while running docker-compose up


I found a working solution.

Don’t use the snap installation and do this instead (tested Ubuntu 20.04)

apt install docker.io docker-compose


adding the directory where I am running my docker-compose.yml using the apparmor reconfigure tool:

$ sudo dpkg-reconfigure apparmor


You need to update your AppArmor configuration :

Snap Dockers are heavily controlled with AppArmor.

To diagnose if it is really the case, check the last lines of the syslog after you triggered the error :

dmesg | grep docker-compose

You should see a snap.docker that was denied:

kernel: [ ] audit: type=1400 audit(….):
apparmor=”DENIED” operation=”exec” profile=”snap.docker.dockerd”
name=”/bin/kmod” pid=7213 comm=”exe” requested_mask=”x”
denied_mask=”x” fsuid=0 ouid=0

To correct this, just go to apparmor config’s tunables :

cd /etc/apparmor.d/tunables

And edit HOMEDIRS variables in the ‘home’ file, for example from :



@{HOMEDIRS}=/home/ /media/aUser/Linux/

hope that helps.


All the other answers didn’t work for me.

docker –version

Docker version 20.10.17, build 100c701

docker-compose -v

docker-compose version 1.29.2, build unknown

Instead of

docker-compose up

please use

docker compose up

Leave a comment