# root-check

> Try to downgrade the permissions of a process with root privileges and block access if it fails

Latest version **2.0.0** (published 2021-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install root-check
pnpm add root-check
yarn add root-check
bun add root-check
```

## Health

**Score 28/100 (F)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-05-03 |
| First published | 2015-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/root-check) |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 2 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | sudo, root, user, permissions, uid, block, prevent, stop, downgrade, drop, privileges, check |

## Links

- npm: https://www.npmjs.com/package/root-check
- Repository: https://github.com/sindresorhus/root-check
- Homepage: https://github.com/sindresorhus/root-check#readme
- Issues: https://github.com/sindresorhus/root-check/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/root-check

## Dependencies (2)

- [sudo-block](https://npm.io/package/sudo-block.md) ^4.0.0
- [downgrade-root](https://npm.io/package/downgrade-root.md) ^2.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-05-03
- 1.0.0 — 2015-01-07

## README

# root-check

> Try to [downgrade the permissions](https://github.com/sindresorhus/downgrade-root) of a process with root privileges and [block access](https://github.com/sindresorhus/sudo-block) if it fails

![](https://github.com/sindresorhus/sudo-block/raw/main/screenshot.png)

## Install

```
$ npm install root-check
```

## Usage

```js
import rootCheck from 'root-check';

rootCheck();
```

## API

See the [`sudo-block` API](https://github.com/sindresorhus/sudo-block#api).

---
_Source: https://npm.io/package/root-check · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
