Super User is a question and answer site for computer enthusiasts and power users. 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

I used command to delete all files modified within last day.

But is there a command that can go through all PHP files and all directories and modify them back to standard permissions that's safe for web in one shot instead of me going through each directory?

I'm guessing 644 for PHP files and 755 for directories?

Thanks! Scott

share|improve this question
up vote 3 down vote accepted

You most likely need the standard program called find.

find -name "*.php" -type f -exec chmod 644 \{\} \;
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .