title: Docker compose could not open directory permisson denied
body: <p>I am totally a newbie when it comes to Docker. And I am trying to understand it with a dummy project. 
  I have a django project and my <code>Dockerfile</code> is inside the Django project's root folder. And my <code>docker-compose.yml</code> file is under the top root folder which contains django project folder and other config files. </p>
  
  <p>my <code>docker-compose.yml</code> </p>
  
  <pre><code>version: '3'
  services:
    db:
      image: postgres
      container_name: dummy_project_postgres
      volumes:
        - ./data/db:/var/lib/postgresql/data
  
    event_planner:
      build: ./dummy_project
      container_name: dummy_project
      volumes:
        - .:/web
      ports:
        - "8000:8000"
      depends_on:
        - db
      links:
        - db:postgres
  </code></pre>
  
  <p>and my <code>Dockerfile</code></p>
  
  <pre><code>FROM python:3
  ENV PYTHONUNBUFFERED 1
  RUN mkdir /web
  WORKDIR /web
  ADD requirements.txt /web/
  RUN pip install -r requirements.txt
  ADD . /web/
  </code></pre>
  
  <p>I am trying to run the following commands </p>
  
  <pre><code># stop and remove the existing containers
  docker-compose stop
  docker-compose rm -f
  
  # up and run the container
  docker-compose build
  docker-compose up -d
  
  docker-compose exec dummy_project bash
  </code></pre>
  
  <p>When I do <code>docker-compose up -d</code>, I see this error.</p>
  
  <pre><code>docker-compose up -d                                                                         
  dummy_project_postgres is up-to-date
  Starting dummy_project ... done
  warning: could not open directory 'data/db/': Permission denied
  </code></pre>
  
  <p>I know this question asked before, but I didn't quite get the solution I need and I am stuck for hours now. </p>
  
  <p><strong>EDIT:</strong> I have all the permissions for all the folders under the top folder <br>
  <strong>EDIT2:</strong> <code>sudo docker-compose up -d</code> also results the same error.</p>