TITLE: Pullback of Sheaf Cohomology
QUESTION [5 upvotes]: In the Wikipedia page of Sheaf Cohomology, 
https://en.wikipedia.org/wiki/Sheaf_cohomology#cite_note-3
In the section Functoriality, suppose $X$ and $Y$ are two topological spaces and $E$ is any sheaf of abelian groups on $Y$, then there is a pullback homomorphism,
\begin{equation}
f^*:H^i(Y,E) \rightarrow H^i(X,f^*E)
\end{equation}
I only know the proof of the special case in algebraic geometry. Does anyone know a proof of this fact in the more general setting?
If we change to the more categorical setting, i.e. $X$ and $Y$ are two sites and the pullback homomorphism of sheaves on $Y$ is well defined, then do we still have this pullback homomorphism at cohomology level?

REPLY [8 votes]: The adjunction $(f^*,f_*)$ gives rise to a unit morphism $1\rightarrow f_*f^*$. Compose with $f_*\rightarrow Rf_*$ to get a canonical map $u:1\rightarrow Rf_*f^*$.
If you have an isomorphism $R\Gamma(Y,.)\circ Rf_*\simeq R\Gamma(X,.)$, you will have isomorphisms $H^i(Y,Rf_*\mathcal{F})\simeq H^i(X,\mathcal{F})$ for any sheaf $\mathcal{F}$ on $X$. Composing, this isomorphism with $u$, you get 
$$ H^i(Y,E)\rightarrow H^i(Y,Rf_*f^*E)\simeq H^i(X,f^*E)$$
which is the morphism you are looking for.
The isomorphism $R\Gamma(Y,.)\circ Rf_*\simeq R\Gamma(X,.)$ holds in many cases. It holds if for example $f^*$ is exact (so that $f_*$ will preserve injectives), or if cohomology can be computed with flasque sheaves (so on topological spaces) since $f_*$ preserve them. I got confused with a bunch of statements I have been told, so I can't say for sure when it does not hold. But I strongly suspect there are some issues with big sites.