Can, may are often confused in use.
In its commonest sense can expresses ability, whether physical or mental. But can may imply ability that is granted (as by the will of the people or one in authority).
May fundamentally expresses not ability but possibility .
When the possibility depends for its fulfillment on the permission or sanction of another, may is the usual term.
The use of can for may in asking or granting permission is widespread.