fix templates folder permissions