Making executable all PHP files (recursively)

usr-local-ΕΨΗΕΛΩΝ picture usr-local-ΕΨΗΕΛΩΝ · Dec 27, 2010 · Viewed 8.9k times · Source

I just downloaded MediaWiki software on my server for installation. After decompressing it, I noticed that PHP files were not executable.

I ran chmod +x *.php* (there are also .php5 files) but it didn't work in subdirectories.

How can I add the executable flag to all PHP scripts inside the MediaWiki folder recursively scanning the subfolders?

Thank you in advance.

Answer

shfx picture shfx · Dec 27, 2010

Use bash in the MediaWiki directory

find . -iname "*.php" | xargs chmod +x