title: Building electron app on ubuntu fails with 'Permission denied'
body: <p>I tried building my electron project on my ubuntu system using the '<strong>electron-builder</strong>' module, but <code>npm run dist</code> always outputs this error:</p>
  
  <pre><code>&gt; project@1.0.0 dist /home/user/GitRepos/project
  &gt; build
  
  sh: 1: build: Permission denied
  npm ERR! code ELIFECYCLE
  npm ERR! errno 126
  npm ERR! project@1.0.0 dist: `build`
  npm ERR! Exit status 126
  npm ERR!
  npm ERR! Failed at the project@1.0.0 dist script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /home/user/.npm/_logs/2018-12-03T10_20_50_566Z-debug.log
  </code></pre>
  
  <p>I already tried using <code>sudo npm run dist</code>, since I assumed my user might just had not the required permissions for building, but is caused the exact same error.</p>
  
  <p>Here are my scripts, dependencies and linux build settings from my <code>package.json</code>:</p>
  
  <pre><code>"scripts": {
    "start": "electron .",
    "pack": "build --dir",
    "dist": "build",
    "postinstall": "install-app-deps"
  },
  "dependencies": {
    "archiver": "^3.0.0",
    "electron-store": "^2.0.0",
    "popper.js": "^1.14.4",
    "unzipper": "^0.9.4"
  },
  "devDependencies": {
    "electron": "^3.0.10",
    "electron-builder": "^20.28.4"
  },
  "build": {
    "linux": {
      "target": [
        "AppImage",
        "deb"
      ]
    }
  }
  </code></pre>
  
  <p>Anyone got an idea or has experienced a similar thing with electron on ubuntu?</p>
  
  <p>P.S: If more information is needed, don't hesitate to ask!</p>