$ npm install downgrade-root
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.
$ npm install downgrade-root
import downgradeRoot from 'downgrade-root';
try {
downgradeRoot();
} catch {
console.error('Couldn\'t downgrade permissions');
}
Useful for trying to downgrade permission before blocking using your app as root.
© 2010 - cnpmjs.org x YWFE | Home | YWFE