Wordpress directory and file permission

The issue of setting the correct permission hits me every time I install Wordpress. So I've created a script that will set its content to the correct permission. Below is part of the script:


// Make sure that the proper owner is set since I'm deploying to Amazon this time, my user is bitnami. But normally we use wordpress.
>sudo chgrp -R bitnami /WORDPRESS_DIR

// Find and sets all the directories permission to 775. This operation is recursive.
>sudo find /WORDPRESS_DIR -type d -exec chmod 775 {} \;

// Find and sets all the files permission to 664. This operation is recursive.
>sudo find /WORDPRESS_DIR -type f -exec chmod 664 {} \;

0 nhận xét:

Đăng nhận xét