changing permissions on templates and scripts