WordPress ファイルのパーミッションを一括で揃える

気がついたらバラバラでゆるゆる.

file-permissions

「権限は必要最小限に」なのは分かっているのだが.

まめに, 一括で揃えたりする.

cd /var/www/html/wordpress
chown -R apache:apache * 
find . -type d -exec chmod 700 {} \;
find . -type f -exec chmod 600 {} \;
chmod 400 wp-config.php
chmod -R 700 wp-content/uploads
chmod -R 700 wp-content/themes
find . -name .htaccess -exec chmod 604 {} \;

find . -type d -name wp-content -exec ls -ald {} \;

とりあえず.
不具合あれば更新していくべ.

Changing File Permissions « WordPress Codex