Improve configure permission check