I'd like to verify that nothing within /foo/bar is chmod 777. Or, alternatively, I'd like to make sure that nothing within /foo/bar us owned by user1 or in group1.

Is there any way I can recursively verify the permissions within a given subdirectory to make sure there aren't any security holes?

Notice that I do not want to change all the permissions to something specific, nor do I want to change the owner to something specific, so a recursive chmod or chown won't do it...



This will show you anything that matches any of the criteria:

find /foo/bar \( -user user1 -o -group group1 -o -perm -777 \) -print

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.