Permission denied on accessing host directory in docker

Gloria Palma González
1 min readFeb 6, 2018

--

Example error :

$ docker exec -it my-container bash
my-container$ ls
ls: cannot open directory .: Permission denied

This is a way to solve selinux issue :

$ su -c "setenforce 0"$ chcon -Rt svirt_sandbox_file_t /path/my/volume

And … that’s it

:) Au revoir

--

--

Gloria Palma González
Gloria Palma González

Written by Gloria Palma González

My life is a paradigm: I can do anything. IT engineer, melomaniac, in love: #Infrastructure #OpenSource #CommunityLeadershipTeams #SoftwareEngineering

Responses (1)