Created
May 2, 2012 20:12
-
-
Save knalli/2580025 to your computer and use it in GitHub Desktop.
Locks a script/binary as preparation for sudo usage
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
# Removes write access for all users (avoids injecting code) | |
sudo chmod -w /path/to/your/script | |
# Transfers the script to root (owned by) | |
sudo chown root /path/to/your/script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment