Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.