Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible for me to view all files on the server with a specific permission?

share|improve this question
up vote 5 down vote accepted

I believe:

find / -type f -perm 0777
share|improve this answer
This will probably not show files with more mode bits set (yes, there are three more: s-gid, s-uid and 'sticky'). I guess a better choice would be: find / -type -f -perm /0777 – Jacek Konieczny Mar 19 '10 at 19:18
@Jacek: not quite, "-perm /xxx" means "Any of the permission bits mode are set for the file", and would also match the "normal-644" file from my example below. – janmoesen Mar 20 '10 at 13:25
Yeah, you are right. I mixed the things up. Should be: find / -type f -perm -0777 – Jacek Konieczny Mar 20 '10 at 19:15

I know the previous answer was accepted, but I wanted to post this "caveat administrator". -perm 0777 matches that exact combination. setuid/setgid files are special, so I use -perm -777 to also include those:

-----[ 19:19:33 ] (!4054) [ :-) ] janmoesen@purplepixelhost ~/bar
$ for x in *; do printf "%4d %s\n" "$(stat -c %a "$x")" "$(ls -dalF "$x")"; done
 777 -rwxrwxrwx 1 janmoesen janmoesen 0 2010-03-19 19:17 all-777*
 644 -rw-r--r-- 1 janmoesen janmoesen 0 2010-03-19 19:17 normal-644
2777 -rwxrwsrwx 1 janmoesen janmoesen 0 2010-03-19 19:17 sgid-777*
4777 -rwsrwxrwx 1 janmoesen janmoesen 0 2010-03-19 19:17 suid-777*

-----[ 19:21:34 ] (!4054) [ :-) ] janmoesen@purplepixelhost ~/bar
$ find . -type f -perm 0777

-----[ 19:21:37 ] (!4054) [ :-) ] janmoesen@purplepixelhost ~/bar
$ find . -type f -perm -777
share|improve this answer

Your question is not clear. You say 'view', but I think you mean 'find'.

Do you want to FIND all files with a specific permission? That would be something like:

find . -type f -perm 777

This would find all files which were Readable, writable and executable by all users on the system.

See some examples at

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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