Let $S$ be the group of all permutations of the set of natural numbers. The cofinality spectrum $CF(S)$ of $S$ is the set of all regular cardinals $\lambda$ such that $S$ can be expressed as the union of a chain of $\lambda$ proper subgroups. This paper investigates which sets $C$ of regular uncountable cardinals can be the cofinality spectrum of $S$. The following theorem is the main result of this paper. Theorem. Suppose that $V \models GCH$. Let $C$ be a set of regular uncountable cardinals which satisfies the following conditions. (a) $C$ contains a maximum element. (b) If $\mu$ is an inaccessible cardinal such that $\mu = \sup(C \cap \mu)$, then $\mu \in C$. (c) If $\mu$ is a singular cardinal such that $\mu = \sup(C \cap \mu)$, then $\mu^+ \in C$. Then there exists a c.c.c. notion of forcing $\mathbb{P}$ such that $V^\mathbb{P} \models CF(S) = C$. We shall also investigate the connections between the cofinality spectrum and $pcf$ theory; and show that $CF(S)$ cannot be an arbitrarily prescribed set of regular uncountable cardinals.