def search_file_perms():
    """
    Search File and Folder Permissions (search_file_perms)
    Search the identified file systems for insure file and folder permissions

    :return: None
    """
    
    print "[*] ENUMERATING FILE AND DIRECTORY PERMISSIONS/CONTENTS...\n"

    fdperms = {
        "WWDIRSROOT": {"cmd": "find / \( -wholename '/home/homedir*' -prune \) -o \( -type d -perm -0002 \) -exec ls -ld '{}' ';' 2>/dev/null | grep root", "msg": "World Writeable Directories for User/Group 'Root'", "results": []},
        "WWDIRS": {"cmd": "find / \( -wholename '/home/homedir*' -prune \) -o \( -type d -perm -0002 \) -exec ls -ld '{}' ';' 2>/dev/null | grep -v root", "msg": "World Writeable Directories for Users other than Root", "results": []},
        "WWFILES": {"cmd": "find / \( -wholename '/home/homedir/*' -prune -o -wholename '/proc/*' -prune \) -o \( -type f -perm -0002 \) -exec ls -l '{}' ';' 2>/dev/null", "msg": "World Writable Files", "results": []},
        "SUID": {"cmd": "find / \( -perm -2000 -o -perm -4000 \) -exec ls -ld {} \; 2>/dev/null", "msg": "SUID/SGID Files and Directories", "results": []},
        "ROOTHOME": {"cmd": "ls -ahlR /root 2>/dev/null", "msg": "Checking if root's home folder is accessible", "results": []}
    }

    fdperms = execute_cmd(fdperms)
    print_results(fdperms)

    Search File and Folder Permissions (search_file_perms)
    Search the identified file systems for insure file and folder permissions

    :return: None
    
linuxprivchecker.py