Also handle files in /etc/$app

This commit is contained in:
Alexandre Aubin 2024-06-28 18:56:18 +02:00
parent ae3018cdd0
commit 656ff823a9

View file

@ -247,7 +247,7 @@ _ynh_apply_default_permissions() {
# App files can have files of their own # App files can have files of their own
if ynh_system_user_exists --username="$app"; then if ynh_system_user_exists --username="$app"; then
# If this is a file in $install_dir or $data_dir : it should be owned and read+writable by $app only # If this is a file in $install_dir or $data_dir : it should be owned and read+writable by $app only
if [ -f "$target" ] && (is_in_dir "$target" "${install_dir:-}" || is_in_dir "$target" "${data_dir:-}") if [ -f "$target" ] && (is_in_dir "$target" "${install_dir:-}" || is_in_dir "$target" "${data_dir:-}" || is_in_dir "$target" "/etc/$app")
then then
chmod 600 "$target" chmod 600 "$target"
chown "$app:$app" "$target" chown "$app:$app" "$target"