Once upon a time in the land of strict grammar rules, “can” denoted physical or mental ability and “may” denoted permission or authorization. It wasn't OK to use “can” if you were talking about permission. You could hear citizens of this land saying, “May I accompany you to the ball, Miss Fuzzywink?” and “Why of course you may, my dear.” This young lady, perhaps, would ask her suitor about his dancing ability: “Can you do the cha-cha?” and he would answer that he did have the ability: “Why of course I can, Miss Fuzzywink.”
BILLY: "Mother, can I eat all the Halloween candy?"
MOTHER: "Well, you could, but if you did, you'd get sick, so you may not."
BILLY: "Mother, can I fire off this nuclear missile?"
MOTHER: "You can, Billy, but you may not!"