title: Error with npm install on mozjpeg, permission denied?
body: <p>I am running <code>npm install</code> and I get the following error:</p>
  
  <pre><code>&gt; mozjpeg@5.0.0 postinstall /home/MyUser/public_html/node_modules/mozjpeg
  &gt; node lib/install.js
  
    ⚠ The `/home/MyUser/public_html/node_modules/mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly
    ⚠ mozjpeg pre-build test failed
    ℹ compiling from source
    ✖ Error: autoreconf -fiv &amp;&amp; ./configure --disable-shared --disable-dependency-tracking --with-jpeg8  --prefix="/home/MyUser/public_html/node_modules/mozjpeg/vendor" --bindir="/home/MyUser/public_html/node_modules/mozjpeg/vendor" --libdir="/home/MyUser/public_html/node_modules/mozjpeg/vendor" &amp;&amp; make -j4 &amp;&amp; make install -j4
  Command failed: ./configure --disable-shared --disable-dependency-tracking --with-jpeg8  --prefix="/home/MyUser/public_html/node_modules/mozjpeg/vendor" --bindir="/home/MyUser/public_html/node_modules/mozjpeg/vendor" --libdir="/home/MyUser/public_html/node_modules/mozjpeg/vendor"
  /bin/sh: ./configure: Permission denied
  
      at ChildProcess.exithandler (child_process.js:199:12)
      at emitTwo (events.js:106:13)
      at ChildProcess.emit (events.js:191:7)
      at maybeClose (internal/child_process.js:920:16)
      at Socket.&lt;anonymous&gt; (internal/child_process.js:351:11)
      at emitOne (events.js:96:13)
      at Socket.emit (events.js:188:7)
      at Pipe._handle.close [as _onclose] (net.js:497:12)
  
  &gt; optipng-bin@3.1.4 postinstall /home/MyUser/public_html/node_modules/optipng-bin
  &gt; node lib/install.js
  
    ✔ optipng pre-build test passed successfully
  
  &gt; pngquant-bin@4.0.0 postinstall /home/MyUser/public_html/node_modules/pngquant-bin
  &gt; node lib/install.js
  
    ⚠ The `/home/MyUser/public_html/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
    ⚠ pngquant pre-build test failed
    ℹ compiling from source
    ✔ pngquant pre-build test passed successfully
    ✖ Error: pngquant failed to build, make sure that libpng-dev is installed
      at Promise.all.then.arr (/home/MyUser/public_html/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
      at process._tickCallback (internal/process/next_tick.js:109:7)
  </code></pre>
  
  <p>This seems like lack of permissions, but I don't understand why. If I run the same command as root, everything works fine. What am I lacking permissions for, and how can I fix that?</p>
  
  <p>Thank you.</p>