How to Find Files with Specific Permission Settings in unix ?

The UNIX administrator needs to know how to find files with specific security settings. Here are a few examples of the find command.

1. Find all SetUID files in and under the current working directory (.).

% find . -type f -perm -4000 -print

2. Find all SetGID files in and under the current working directory (.).

% find . -type f -perm -2000 -print

3. find all world-writable files in and under the current working dir- ectory (.).

% find . -type f -perm -o+w -print

Leave a Comment

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top