Skip to content

Instantly share code, notes, and snippets.

@cookie-ag
Last active July 18, 2017 10:16
Show Gist options
  • Save cookie-ag/cb8db944cf920e7b7ca6487c77808e1a to your computer and use it in GitHub Desktop.
Save cookie-ag/cb8db944cf920e7b7ca6487c77808e1a to your computer and use it in GitHub Desktop.
Giving safeuser permission to access port 80
// Since safeuser is not admin, it cannot access port 80 permissions.
// For obvious reasons, we don't want root to access the node.js in production
- sudo apt-get install libcap2-bin
# Non nodesource distribution
- which node
- sudo setcap cap_net_bind_service=+ep /usr/local/bin/node
# Nodesource distribution
- which nodejs
- sudo setcap cap_net_bind_service=+ep /usr/bin/nodejs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment