Created
May 23, 2014 16:52
-
-
Save todd-dsm/adb303e265cfbdf1a7f0 to your computer and use it in GitHub Desktop.
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
# Find and World-Writable files criteria: | |
# 1) files but not hard/soft links | |
# 2) in any directory except: /proc, /dev, libs, or /sys | |
# 3) with +o=w permissions | |
# 4) print it all to a file | |
find / \( -type f -o ! -type l \) \ | |
-name "proc" -prune -o -name "dev" -prune -o -name "sys" -prune \ | |
-o -name "lib" -prune -o -name "lib64" -prune \ | |
-o -perm 0002 -o ! -perm 777 -o ! -perm 775 \ | |
\( -printf '%#m %u %g %p\n' \) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment