title: NPM/Cordova permissions Error: EACCES: permission denied, scandir
body: <p>When I run <code>cordova plugin add cordova-plugin-geolocation</code> I receive the following error. I have tried enable 777 on this folder, setting myself as the owner etc. In these circumstances I'm not allowed to use <code>sudo</code>, but am confident if I could that would solve the problem.</p>
  
  <pre><code>Failed to install 'cordova-plugin-geolocation': Error: EACCES: permission denied, scandir '/Users/username/documents/core/myapp/app/platforms/ios/build/device/libCordova.a'
      at Error (native)
      at Object.fs.readdirSync (fs.js:952:18)
      at GlobSync._readdir (/Users/username/documents/core/myapp/app/platforms/ios/cordova/node_modules/glob/sync.js:275:41)
      at GlobSync._readdirInGlobStar (/Users/username/documents/core/myapp/app/platforms/ios/cordova/node_modules/glob/sync.js:254:20)
      at GlobSync._readdir (/Users/username/documents/core/myapp/app/platforms/ios/cordova/node_modules/glob/sync.js:263:17)
      at GlobSync._processReaddir (/Users/username/documents/core/myapp/app/platforms/ios/cordova/node_modules/glob/sync.js:135:22)
      at GlobSync._process (/Users/username/documents/core/myapp/app/platforms/ios/cordova/node_modules/glob/sync.js:130:10)
      at GlobSync._processGlobStar (/Users/username/documents/core/myapp/app/platforms/ios/cordova/node_modules/glob/sync.js:360:10)
      at GlobSync._process (/Users/username/documents/core/myapp/app/platforms/ios/cordova/node_modules/glob/sync.js:128:10)
      at GlobSync._processGlobStar (/Users/username/documents/core/myapp/app/platforms/ios/cordova/node_modules/glob/sync.js:363:10)
  Error: EACCES: permission denied, scandir '/Users/username/documents/core/myapp/app/platforms/ios/build/device/libCordova.a'
  </code></pre>