downgrade

1.1.4 • Public • Published

downgrade travis npm downloads javascript style guide

Sets the user identity of the process to www-data

install

npm install downgrade

usage

To attempt to set the user identity of the process to www-data (a good default on most linux systems):

var downgrade = require('downgrade')
 
downgrade()

Or, to set the user identity to a specific ID:

downgrade('username', 'group')

The arguments can be either a numerical ID or a username/group string. If a string is specified, this method blocks while resolving it to a numerical ID.

If the current user's permissions do not allow the user identity to be changed, this function will do nothing (no-op).

For best results, start your node process as root, run actions that require root privileges, then downgrade the user permissions.

On non-posix platforms (e.g. Windows), this module does nothing.

license

MIT. Copyright (c) Feross Aboukhadijeh.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.4195latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.4195
1.1.31
1.1.21
1.1.11
1.1.01
1.0.11
1.0.01

Package Sidebar

Install

npm i downgrade

Weekly Downloads

201

Version

1.1.4

License

MIT

Unpacked Size

5.27 kB

Total Files

6

Last publish

Collaborators

  • feross