# ref http://en.wikipedia.org/wiki/Setuid # find Setuid world writable files find / \( \( -perm -4000 -o -perm -2000 -type f \) -and \( -perm -0002 -o -perm -0020 \) \) -type f -ls find . -perm 777 -exec chmod 755 {} \; find / -perm 777 -type d