qr_ynh/scripts/_common.sh

15 lines
769 B
Bash

libreqr_apply_filesystem_permissions() {
find "$final_path" -type f -exec chmod 400 "{}" +
find "$final_path" -type f -exec chown www-data:www-data "{}" +
find "$final_path" -type d -exec chmod 510 "{}" +
find "$final_path" -type d -exec chown $app:www-data "{}" +
find "$final_path" -type f -name "*.php" -exec chmod 400 "{}" +
find "$final_path" -type f -name "*.php" -exec chown $app:$app "{}" +
find "$final_path" -type f -name "*.css" -exec chmod 440 "{}" +
find "$final_path" -type f -name "*.css" -exec chown $app:www-data "{}" +
find "$final_path" -type f -name "*.less" -exec chmod 440 "{}" +
find "$final_path" -type f -name "*.less" -exec chown $app:www-data "{}" +
chmod 750 "$final_path"/css
chown $app:www-data "$final_path"/css
}