Skip to content

Instantly share code, notes, and snippets.

@metalrufflez
Created October 8, 2012 19:04
Show Gist options
  • Save metalrufflez/3854265 to your computer and use it in GitHub Desktop.
Save metalrufflez/3854265 to your computer and use it in GitHub Desktop.
Chmod protection
#!/bin/bash
if [ "$#" -eq 0 ]; then
chmod
exit 1
fi
if [ "$1" -eq "777" ]; then
exit 1
else
chmod $*
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment