Sets the user identity of the process to
npm install downgrade
To attempt to set the user identity of the process to
www-data (a good default on most
var downgrade = require('downgrade') downgrade()
Or, to set the user identity to a specific ID:
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
privileges, then downgrade the user permissions.
On non-posix platforms (e.g. Windows), this module does nothing.
MIT. Copyright (c) Feross Aboukhadijeh.