{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/3266","labels_url":"https://api.github.com/repos/atom/electron/issues/3266/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/3266/comments","events_url":"https://api.github.com/repos/atom/electron/issues/3266/events","html_url":"https://github.com/atom/electron/issues/3266","id":114075263,"number":3266,"title":"Error: EPERM: operation not permitted, open","user":{"login":"sergiuwd","id":11777503,"avatar_url":"https://avatars.githubusercontent.com/u/11777503?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiuwd","html_url":"https://github.com/sergiuwd","followers_url":"https://api.github.com/users/sergiuwd/followers","following_url":"https://api.github.com/users/sergiuwd/following{/other_user}","gists_url":"https://api.github.com/users/sergiuwd/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiuwd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiuwd/subscriptions","organizations_url":"https://api.github.com/users/sergiuwd/orgs","repos_url":"https://api.github.com/users/sergiuwd/repos","events_url":"https://api.github.com/users/sergiuwd/events{/privacy}","received_events_url":"https://api.github.com/users/sergiuwd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-29T15:29:23Z","updated_at":"2015-10-29T16:40:26Z","closed_at":null,"body":"Hi!\r\nI get this error in my app:\r\n<b>Error: EPERM: operation not permitted, open 'C:\\Program Files (x86)\\Full Menu\\db\\main.json'</b>\r\n\r\nThe app I have is built with electron-boilerplate. I am using this function to get the path to the root of the app:\r\n<pre>path.dirname(process.execPath)</pre>\r\n\r\nAnd this is the script that writes the file:\r\n<pre>fs.writeFile(apath + '/db/' + elem + '.json', JSON.stringify(results)</pre>\r\n\r\nI know what the problem is: permissions. But how could I get this working without running the app as an administrator?"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/152241951","html_url":"https://github.com/atom/electron/issues/3266#issuecomment-152241951","issue_url":"https://api.github.com/repos/atom/electron/issues/3266","id":152241951,"user":{"login":"paulcbetts","id":1396,"avatar_url":"https://avatars.githubusercontent.com/u/1396?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcbetts","html_url":"https://github.com/paulcbetts","followers_url":"https://api.github.com/users/paulcbetts/followers","following_url":"https://api.github.com/users/paulcbetts/following{/other_user}","gists_url":"https://api.github.com/users/paulcbetts/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcbetts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcbetts/subscriptions","organizations_url":"https://api.github.com/users/paulcbetts/orgs","repos_url":"https://api.github.com/users/paulcbetts/repos","events_url":"https://api.github.com/users/paulcbetts/events{/privacy}","received_events_url":"https://api.github.com/users/paulcbetts/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T16:40:26Z","updated_at":"2015-10-29T16:40:26Z","body":"These don't seem to be related, why would you _have_ to write to Program Files or relative to process.execPath?"}}