exec perms and better detect script