If you cast charm or dominate person on a person in Pathfinder or D&D does the target know (s)he is being charmed? And if (s)he does, does (s)he know this during the effect or only after it?
Charm doesn't modify your target's memories. Nothing in the Enchantment school description, the Charm subschool description, or the [Mind-affecting] tag description, suggests that the target's memory is modified in any way on top of what the spell text describes.
However, there's also no rule saying that the target automatically recognizes what spell was cast on him. He would need to roll a Spellcraft check, for which he has three opportunities:
- DC 16 when the spell is being cast
- DC 26 right after the saving throw is made
- DC 21 at any later time
Since the "sense enchantment" function of Sense Motive does not specify it cannot be used on yourself, the target could also attempt to roll that check for as long as he is charmed, which is a flat DC 25.
Of course, realizing that your best friend has charmed you is not going to change your attitude towards him. That guy, what a jokester! Always pulling tricks like that. Once the spell fades and his attitude towards you returns to normal, he might feel slightly less charitable - but only if he was able to identify that he was charmed in the first place.
Charm Person does not mention any effect that deletes memories. The related spell Hypnotism spcifically notes that the fact that you were enspelled is forgotten:
Hypnotism: Even after the spell ends, the creature retains its new attitude toward you, but only with respect to that particular request. A creature that fails its saving throw does not remember that you enspelled it.
Charm Person has no such specific rule, instead it says:
The spell does not enable you to control the charmed person as if it were an automaton, but it perceives your words and actions in the most favorable way. You can try to give the subject orders, but you must win an opposed Charisma check to convince it to do anything it wouldn’t ordinarily do.
This special kind of perception is probably remembered. But that does not necessarily mean the subject is aware of having been charmed. It could also mean the subject remembers the caster in this favorable way without knowing just why.
I would allow a spellcraft check.
After rolling a save against a spell targeted at you, identify that spell. DC 25+ spell level, no retry. Rules Compendium, p. 138
A successful check would automatically make the target aware that he or she was charmed. Failing that you could also allow a sense motive check.
By observing someone for a minute, you can tell if that person's behaviour is being influenced by an anchantment effect, even if that person is not aware of it. Rules Compendium, p.69
You certainly observe your own actions, so why not allow the check for realizing your former behaviour was influenced by a charm spell DC 25+spell level.
In case you have seen the caster cast the spell I would allow a normal spellcraft check DC 15+spell level.
I would say unless the target saw a spellcaster casting in their apparent direction, AND they chose to make a spellcraft check (if they have the skill), then maybe, that said, if affected they would still have them treat the caster in the best possible way. I dont think there should be any special sense or chance of detection that should allow a charmed person to think they were charmed.