Provisioning script cleanup and permission fix