Return EPERM if TASK is not right.