A general form of the photon position operator with commuting components is obtained. This operator commutes with the photon helicity operator, is Hermitian with respect to the Bia lynicki -Birula scalar product and defined up to a unitary transformation preserving the transversality condition. It is shown that using the procedure introduced by T. T. Wu and C. N. Yang the string singularity of the photon position operator is avoided. Furthermore, the photon position operator is defined by a flat connection on some trivial bundle over R 3 \ {(0, 0, 0)}.