UNIX: Just been hacked.. any steps to securing files and directories?

2

1

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

Scott Yu - Front-End UX

Posted 2011-04-22T08:48:02.807

Reputation: 417

Answers

3

You most likely need the standard program called find.

find -name "*.php" -type f -exec chmod 644 \{\} \;

vadipp

Posted 2011-04-22T08:48:02.807

Reputation: 252