{"action":"created","issue":{"url":"https://api.github.com/repos/remy/nodemon/issues/254","labels_url":"https://api.github.com/repos/remy/nodemon/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/remy/nodemon/issues/254/comments","events_url":"https://api.github.com/repos/remy/nodemon/issues/254/events","html_url":"https://github.com/remy/nodemon/issues/254","id":25092055,"number":254,"title":"Error: EACCES, permission denied '/root/.config/configstore/update-notifier-nodemon.yml'","user":{"login":"WangFubo","id":2599547,"avatar_url":"https://avatars.githubusercontent.com/u/2599547?v=3","gravatar_id":"","url":"https://api.github.com/users/WangFubo","html_url":"https://github.com/WangFubo","followers_url":"https://api.github.com/users/WangFubo/followers","following_url":"https://api.github.com/users/WangFubo/following{/other_user}","gists_url":"https://api.github.com/users/WangFubo/gists{/gist_id}","starred_url":"https://api.github.com/users/WangFubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WangFubo/subscriptions","organizations_url":"https://api.github.com/users/WangFubo/orgs","repos_url":"https://api.github.com/users/WangFubo/repos","events_url":"https://api.github.com/users/WangFubo/events{/privacy}","received_events_url":"https://api.github.com/users/WangFubo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/remy/nodemon/labels/bug","name":"bug","color":"ff0000"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-01-06T09:25:42Z","updated_at":"2015-11-27T15:46:34Z","closed_at":null,"body":"It seems that nodemon DO NOT get the right user, when i use supervisor (running under user root) and swith to another user. \r\n\r\nFor Example, \r\nsupervisord.conf\r\ncommand=/usr/bin/nodemon xxoo.js\r\nuser=worker\r\n\r\nnodemon still trying to get config from \"/root/.config/configstore/update-notifier-nodemon.yml\" but NOT \"/path/to/user-worker-home/.config/configstore/update-notifier-nodemon.yml\"\r\n\r\nexception in nodemon killing node\r\nError: EACCES, permission denied '/root/.config/configstore/update-notifier-nodemon.yml'\r\nYou don't have access to this file.\r\n\r\n    at Object.fs.openSync (fs.js:427:18)\r\n    at Object.fs.readFileSync (fs.js:284:15)\r\n    at Object.create.all.get (/usr/lib/node_modules/nodemon/node_modules/update-notifier/node_modules/configstore/configstore.js:31:29)\r\n    at Object.Configstore (/usr/lib/node_modules/nodemon/node_modules/update-notifier/node_modules/configstore/configstore.js:24:40)\r\n    at new UpdateNotifier (/usr/lib/node_modules/nodemon/node_modules/update-notifier/lib/update-notifier.js:34:17)\r\n    at module.exports (/usr/lib/node_modules/nodemon/node_modules/update-notifier/lib/update-notifier.js:140:23)\r\n    at Object.<anonymous> (/usr/lib/node_modules/nodemon/bin/nodemon.js:7:16)\r\n    at Module._compile (module.js:456:26)\r\n    at Object.Module._extensions..js (module.js:474:10)\r\n    at Module.load (module.js:356:32)"},"comment":{"url":"https://api.github.com/repos/remy/nodemon/issues/comments/160164196","html_url":"https://github.com/remy/nodemon/issues/254#issuecomment-160164196","issue_url":"https://api.github.com/repos/remy/nodemon/issues/254","id":160164196,"user":{"login":"leijing7","id":2281763,"avatar_url":"https://avatars.githubusercontent.com/u/2281763?v=3","gravatar_id":"","url":"https://api.github.com/users/leijing7","html_url":"https://github.com/leijing7","followers_url":"https://api.github.com/users/leijing7/followers","following_url":"https://api.github.com/users/leijing7/following{/other_user}","gists_url":"https://api.github.com/users/leijing7/gists{/gist_id}","starred_url":"https://api.github.com/users/leijing7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leijing7/subscriptions","organizations_url":"https://api.github.com/users/leijing7/orgs","repos_url":"https://api.github.com/users/leijing7/repos","events_url":"https://api.github.com/users/leijing7/events{/privacy}","received_events_url":"https://api.github.com/users/leijing7/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T15:46:34Z","updated_at":"2015-11-27T15:46:34Z","body":"Thanks Shaunstanislaus. I fixed it via your way.\r\nMy problem is I once ran my code with sudo, then have to use sudo every time since then. but node is ok, just nodemon needs sudo privilege."}}