Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I've been trying to get the -perm option of find to give me all PHP files that are group writable. Should this work?

find -name "*.php" -perm g-w


share|improve this question
up vote 4 down vote accepted


find -iname "*.php" -perm -g=w

-g=w means look for files that have this permission set.

share|improve this answer
May want -iname just in case some are .PHP for some bizzare reason. – Daenyth Jun 23 '10 at 19:01
@daenyth - Good point! Added it to my answer! +1 – BloodPhilia Jun 23 '10 at 19:06
Thanks a ton man! – Kristopher Ives Jun 23 '10 at 21:21
@kristopher - You're very welcome! – BloodPhilia Jun 23 '10 at 21:34

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.