Inverse image of a closed subscheme Let $f:X\to Y$ be a surjective morphism of schemes, and $Z\subset Y$ a closed subscheme with short exact sequence
$$ 0\to I_Z \to \mathcal{O}_Y \to \mathcal{O}_Z \to 0. $$
What are sufficient conditions on $X$, $Y$, $Z$ and $f$ such that the scheme-theoretic inverse image $W$ of $Z$ is a closed subscheme of $X$ with short exact sequence
$$ 0\to f^*(I_Z) \to \mathcal{O}_X \to \mathcal{O}_W \to 0  \quad? $$

Do you see that $f^*(I_Z) \to \mathcal{O}_X \to \mathcal{O}_W \to 0$ is always exact? So the question is basically only if $f^*(I_Z) \to \mathcal{O}_X$ is injective. This holds when $f$ is flat.
