Morocco's inflation rose to 5% year-on-year in August, slightly up from 4.9% a month earlier, fueled by food prices.