fix perm script