title: Permissions errors while using Nodejs
body: <p>I am using <code>npm</code> inside a docker container with the user <code>root</code> however I am getting the two following errors:</p>
  <pre><code>glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
    errno: -13,
    code: 'EACCES',
    syscall: 'scandir',
    path: '/root/.npm/_logs'
  }
  </code></pre>
  <p>and</p>
  <pre><code>Error: EACCES: permission denied, open '/application/public/mix-manifest.json'
    errno: -13,
    syscall: 'open',
    code: 'EACCES',
    path: '/application/public/mix-manifest.json'
  }
  </code></pre>
  <p>however root is the owner of the <code>.npm</code> and <code>.npm/_logs</code> folder:</p>
  <pre><code>~/
  drwxr-xr-x 4 root root 4096 Mar 25 09:12 .npm
  
  ~/.npm/
  drwxr-xr-x 2 root root 4096 Mar 25 09:18 _logs
  </code></pre>
  <p>and <code>root</code> has read/write access to the file <code>/application/public/mix-manifest.json</code>:</p>
  <pre><code>-rwxrwxr-x  1 www-data www-data  119 Mar 15 14:26 mix-manifest.json
  </code></pre>
  <p>What am I doing wrong?</p>
  <p>My Dockerfile contains:</p>
  <pre><code># Node + NPM
  RUN curl -kfsSL https://deb.nodesource.com/setup_15.x | bash -
  RUN apt-get install -y nodejs
  </code></pre>