Last active
July 18, 2017 10:16
-
-
Save cookie-ag/cb8db944cf920e7b7ca6487c77808e1a to your computer and use it in GitHub Desktop.
Giving safeuser permission to access port 80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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