title: Docker mounting volume. Permission denied
body: <p>I have a problem with creating new files in mounted docker volume.</p>
  
  <p>Firstly after installation docker i added my user to docker group.</p>
  
  <pre><code>sudo usermod -aG docker $USER
  </code></pre>
  
  <p>Created as my $USER folder:</p>
  
  <pre><code>mkdir -p /srv/redis
  </code></pre>
  
  <p>And starting container:</p>
  
  <pre><code>docker run -d -v /srv/redis:/data --name myredis redis
  </code></pre>
  
  <p>when i want to create file in /srv/redis as a user which created container I have a problem with access.</p>
  
  <pre><code>mkdir /srv/redis/redisTest
  mkdir: cannot create directory ‘/srv/redis/redisTest’: Permission denied
  </code></pre>
  
  <p>I tried to search in other threads but i didn't find appropriate solution.</p>