Miss any of our Open RFC calls?Watch the recordings here! »

downgrade-root

1.2.2 • Public • Published

downgrade-root Build Status

Try to downgrade the permissions of a process with root privileges

Usually applies to a process started with sudo.

Windows is gracefully ignored as it lacks a way to set UID.

Install

$ npm install --save downgrade-root

Usage

var downgradeRoot = require('downgrade-root');
 
try {
    downgradeRoot();
} catch (err) {
    console.error('Couldn\'t downgrade permissions');
}

Tip

Useful for trying to downgrade permission before blocking using your app as root.

License

MIT © Sindre Sorhus

Install

npm i downgrade-root

DownloadsWeekly Downloads

60,871

Version

1.2.2

License

MIT

Last publish

Collaborators

  • avatar
  • avatar