A. By whom were you given permission to enter?
B. By whom was you given permission to enter?
C. By whom you were given permission to enter?
D. By whom were given you permission to enter?
In such case who will change into by whom.
Rule :
By whom + subject + (was /were) + V3 + other agents.