downgrade-root
Try to downgrade the permissions of a process with root privileges
Last updated 5 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install downgrade-root 
SYNC missed versions from official npm registry.

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.

Install

$ npm install downgrade-root

Usage

import downgradeRoot from 'downgrade-root';

try {
	downgradeRoot();
} catch {
	console.error('Couldn\'t downgrade permissions');
}

Tip

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

Current Tags

  • 2.0.0                                ...           latest (5 years ago)

4 Versions

  • 2.0.0                                ...           5 years ago
  • 1.2.2                                ...           10 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |