Proof (Galois group over F_p)
Let $L$ be a splitting field of $f$ over $\mathbb{F}_p$. Then $L$ is a finite field, so $\Gal(f/\mathbb{F}_p) = \Gal(L/\mathbb{F}_p)$ is cyclic, generated by say $ϕ$.
For each irreducible factor $g_i\mid f$ of degree $n_i$, $L$ contains an intermediate subfield $M$ which is a splitting field of $g_i$ over $\mathbb{F}_p$. Since the restriction $\langle ϕ\rangle = \Gal(L/\mathbb{F}_p) \to \Gal(M/\mathbb{F}_p)$ is a surjection and $\Gal(M/\mathbb{F}_p)$ is a transitive subgroup of $S_{n_i}$, $ϕ|_M$ is an $n_i$-cycle. Thus $ϕ$ is a $(n_1, \ldots, n_r)$-cycle.