Find all files owned by the user root that have been modified within the last 5 minutes or more than 2 days ago and change their permissions to 0777.
find / -mindepth 1 -user root -mmin -5 -mtime +2 -exec chmod 0777 {} \;