qr_ynh/scripts/_common.sh

17 lines
825 B
Bash
Raw Permalink Normal View History

libreqr_apply_filesystem_permissions() {
2023-07-08 22:28:20 +02:00
mktemp -p "$install_dir"/css/
rm "$install_dir"/css/*
find "$install_dir" -type f -exec chmod 400 "{}" +
find "$install_dir" -type f -exec chown www-data:www-data "{}" +
find "$install_dir" -type d -exec chmod 510 "{}" +
find "$install_dir" -type d -exec chown $app:www-data "{}" +
find "$install_dir" -type f -name "*.php" -exec chmod 400 "{}" +
find "$install_dir" -type f -name "*.php" -exec chown $app:$app "{}" +
find "$install_dir" -type f -name "*.css" -exec chmod 440 "{}" +
find "$install_dir" -type f -name "*.css" -exec chown $app:www-data "{}" +
find "$install_dir" -type f -name "*.less" -exec chmod 440 "{}" +
find "$install_dir" -type f -name "*.less" -exec chown $app:www-data "{}" +
chmod 750 "$install_dir"/css
chown $app:www-data "$install_dir"/css
}