开发者

Making executable all PHP files (recursively)

开发者 https://www.devze.com 2023-02-01 02:49 出处:网络
I just downloaded MediaWiki software on my server for installation. After decompressing it, I noticed that PHP files were not execu开发者_JS百科table.

I just downloaded MediaWiki software on my server for installation. After decompressing it, I noticed that PHP files were not execu开发者_JS百科table.

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.


Use bash in the MediaWiki directory

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


It does not work in subdirectories, because *.php* does not match any directories and hence does not include it.

Therefore you should use something like find ./ -iname "*.php*" -exec chmod 755 {} \; with the respective bits to set.

0

精彩评论

暂无评论...
验证码 换一张
取 消