  We study anomalies of discrete internal global symmetry $G$ in
two-dimensional rational conformal field theories based on twisted torus
partition functions. The anomaly of $G$ can be seen from the noncommutativity
of two symmetry lines inserted along the nontrivial cycles of two-torus and we
propose a criterion to detect the anomaly, which agrees with the truncated
modular $S$-matrix approach. The obstruction for orbifolding has been recently
interpreted as a mixed anomaly between $G$ and large diffeomorphisms. We
clarify the relations among anomaly-free conditions, orbifoldable conditions,
and invariant boundary state condition, focusing on Wess-Zumino-Witten models.
