ynh_add_config: crons should be owned by root, otherwise they probably don't run?

This commit is contained in:
Alexandre Aubin 2022-01-04 20:09:48 +01:00
parent bd8fe6d4db
commit 0973301b0f

View file

@ -967,4 +967,11 @@ _ynh_apply_default_permissions() {
chown $app:$app $target
fi
fi
# Crons should be owned by root otherwise they probably don't run
if echo "$target" | grep -q '^/etc/cron'
then
chmod 400 $target
chown root:root $target
fi
}