{"_id":"downgrade-root","_rev":"2763852","name":"downgrade-root","description":"Try to downgrade the permissions of a process with root privileges","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"silverwind","email":"me@silverwind.io"},{"name":"sindresorhus","email":""}],"time":{"modified":"2022-02-14T08:03:35.000Z","created":"2015-01-07T11:45:21.256Z","2.0.0":"2021-05-03T20:29:04.092Z","1.2.2":"2016-06-15T16:58:19.576Z","1.1.0":"2015-01-07T16:35:17.582Z","1.0.0":"2015-01-07T11:45:21.256Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/downgrade-root.git"},"versions":{"2.0.0":{"name":"downgrade-root","version":"2.0.0","description":"Try to downgrade the permissions of a process with root privileges","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/downgrade-root.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava"},"keywords":["sudo","root","user","permissions","uid","block","prevent","stop","downgrade","drop","privileges"],"dependencies":{"default-uid":"^2.0.0","is-root":"^3.0.0"},"devDependencies":{"ava":"^3.15.0","xo":"^0.39.1"},"gitHead":"e17e680c75d988432f3714a009149549e354dff2","bugs":{"url":"https://github.com/sindresorhus/downgrade-root/issues"},"homepage":"https://github.com/sindresorhus/downgrade-root#readme","_id":"downgrade-root@2.0.0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"13163b6dcb12db680593c2ee9f49daab20d967ab","size":1683,"noattachment":false,"key":"/downgrade-root/-/downgrade-root-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/downgrade-root/download/downgrade-root-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"silverwind","email":"me@silverwind.io"},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/downgrade-root_2.0.0_1620073743954_0.3022055555593801"},"_hasShrinkwrap":false,"publish_time":1620073744092,"_cnpm_publish_time":1620073744092,"_cnpmcore_publish_time":"2021-12-16T15:27:23.476Z"},"1.2.2":{"name":"downgrade-root","version":"1.2.2","description":"Try to downgrade the permissions of a process with root privileges","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/downgrade-root.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"ava"},"files":["index.js"],"keywords":["sudo","root","user","permissions","uid","block","prevent","stop","downgrade","drop","privileges"],"dependencies":{"default-uid":"^1.0.0","is-root":"^1.0.0"},"devDependencies":{"ava":"*"},"gitHead":"8c2b9588f75186f2c9bd9ec818f9befa52725b01","bugs":{"url":"https://github.com/sindresorhus/downgrade-root/issues"},"homepage":"https://github.com/sindresorhus/downgrade-root#readme","_id":"downgrade-root@1.2.2","_shasum":"531319715b0e81ffcc22eb28478ba27643e12c6c","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"silverwind","email":"me@silverwind.io"},"dist":{"shasum":"531319715b0e81ffcc22eb28478ba27643e12c6c","size":1762,"noattachment":false,"key":"/downgrade-root/-/downgrade-root-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/downgrade-root/download/downgrade-root-1.2.2.tgz"},"maintainers":[{"name":"silverwind","email":"me@silverwind.io"},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/downgrade-root-1.2.2.tgz_1466009895918_0.7667850428260863"},"directories":{},"publish_time":1466009899576,"_hasShrinkwrap":false,"_cnpm_publish_time":1466009899576,"_cnpmcore_publish_time":"2021-12-16T15:27:23.663Z"},"1.1.0":{"name":"downgrade-root","version":"1.1.0","description":"Try to downgrade the permissions of a process with root privileges","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/downgrade-root"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sudo","root","user","permissions","uid","block","prevent","stop","downgrade","drop","privileges"],"dependencies":{"default-uid":"^1.0.0","is-root":"^1.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"eb182f0df65a12a6ec5c0a0d1020ed65a1de1562","bugs":{"url":"https://github.com/sindresorhus/downgrade-root/issues"},"homepage":"https://github.com/sindresorhus/downgrade-root","_id":"downgrade-root@1.1.0","_shasum":"8d7b30bb649d846212bb67c2417d6bb92d121f6a","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"silverwind","email":"me@silverwind.io"},{"name":"sindresorhus","email":""}],"dist":{"shasum":"8d7b30bb649d846212bb67c2417d6bb92d121f6a","size":1700,"noattachment":false,"key":"/downgrade-root/-/downgrade-root-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/downgrade-root/download/downgrade-root-1.1.0.tgz"},"directories":{},"publish_time":1420648517582,"_hasShrinkwrap":false,"_cnpm_publish_time":1420648517582,"_cnpmcore_publish_time":"2021-12-16T15:27:23.874Z"},"1.0.0":{"name":"downgrade-root","version":"1.0.0","description":"Try to downgrade the permissions of a process with root privileges","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/downgrade-root"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sudo","root","user","permissions","uid","block","prevent","stop","downgrade","drop","privileges"],"dependencies":{"is-root":"^1.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"aa54f47f9c1018ae8b6cea89ab9bcce6ec532df8","bugs":{"url":"https://github.com/sindresorhus/downgrade-root/issues"},"homepage":"https://github.com/sindresorhus/downgrade-root","_id":"downgrade-root@1.0.0","_shasum":"7dd66e01500c0725f2313bdf4020c424fc0a7793","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"silverwind","email":"me@silverwind.io"},{"name":"sindresorhus","email":""}],"dist":{"shasum":"7dd66e01500c0725f2313bdf4020c424fc0a7793","size":1553,"noattachment":false,"key":"/downgrade-root/-/downgrade-root-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/downgrade-root/download/downgrade-root-1.0.0.tgz"},"directories":{},"publish_time":1420631121256,"_hasShrinkwrap":false,"_cnpm_publish_time":1420631121256,"_cnpmcore_publish_time":"2021-12-16T15:27:24.270Z"}},"readme":"# downgrade-root\n\n> Try to downgrade the permissions of a process with root privileges\n\nUsually applies to a process started with `sudo`.\n\nWindows is gracefully ignored as it lacks a way to [set UID](http://nodejs.org/api/process.html#process_process_setuid_id).\n\n## Install\n\n```\n$ npm install downgrade-root\n```\n\n## Usage\n\n```js\nimport downgradeRoot from 'downgrade-root';\n\ntry {\n\tdowngradeRoot();\n} catch {\n\tconsole.error('Couldn\\'t downgrade permissions');\n}\n```\n\n## Tip\n\nUseful for [trying to downgrade permission](https://github.com/sindresorhus/root-check) before [blocking](https://github.com/sindresorhus/sudo-block) using your app as root.\n","_attachments":{},"homepage":"https://github.com/sindresorhus/downgrade-root#readme","bugs":{"url":"https://github.com/sindresorhus/downgrade-root/issues"},"license":"MIT"}