What is the relationship between sheaf cohomology from different global sections functors Let $X$ be a ringed space, and $F$ be a sheaf of abelian groups on $X$. Then $H^i(X, F)$ is the right derived functors of the global sections functor. However, there are at least three different global sections functors that we can take derived functors of:


*

*Forget the ringed space structure and just consider $X$ as a topological space and $F$ is a sheaf of abelian groups. Then, the global sections functor is $Ab(X) \rightarrow Ab$.

*If $F$ has an $O_X$-module structure, then we have another global sections functor $O_X-mod \rightarrow O_X(X)-mod$. That is: the category of sheaves $O_X$-modules to the category of $O_X(X)$-modules

*We can also restrict (2) to the case where $F$ is quasicoherent. That is: we have a functor $QCoh(X) \rightarrow O_X(X)-mod$.


My question is: what is the relationship between them? Injective objects in the category of quasicoherent sheaves is not the same as injective objects in the category of sheaves of $O_X$-modules, see here for an example.
Hartshorne's proposition III.2.6 states that the derived functors $O_X-mod$ to $Ab$ coincide with the cohomology functor. Does this mean that (2) and (1) result in the same cohomology groups, after applying the forgetful functor?
If $X$ is an affine scheme, then the global sections functor is exact. This would imply that the $H^i(X, F)$ for $i \geq 1$ is 0 for the third global sections functor. What about the first and second global sections functors?
 A: Your analysis of the equivalence of (1) and (2) is correct. (2) and (3) are equivalent in the case that $X$ is noetherian, and it is the same idea, though covered slightly later in Hartshorne: III.3.6 says that every quasicoherent sheaf on a noetherian scheme can be embedded in a quasicoherent flasque sheaf, and flasque sheaves are acyclic for global sections, so one may compute cohomology using them. In the general case for $X$ not noetherian, the proof above does not apply and there ought to be counterexamples (see for instance this answer of Roland, though it does not contain an explicit counterexample).
The final paragraph contains a slight misconception: $X$ being an affine scheme only means that the global sections functor is exact on quasicoherent sheaves. We will show that we can have non-quasicoherent sheaves with higher cohomology on affine schemes via a dirty trick. Over an infinite field $k$, the underlying topological spaces of the schemes $\Bbb A^1_k$ and $\Bbb P^1_k$ are homeomorphic (both have one generic point and $|k|$ closed points, and are equipped with topologies where the closed sets are exactly the finite sets of closed points). Let $u:\Bbb A^1_k\to\Bbb P^1_k$ be such a homeomorphism. Then $H^i(\Bbb A^1_k,u^{-1}(\mathcal{F}))=H^i(\Bbb P^1_k,\mathcal{F})$ for $\mathcal{F}$ a sheaf of abelian groups, and so by picking $\mathcal{F}=\mathcal{O}(-2)$, for instance, we can find a sheaf of abelian groups with higher cohomology. The moral here is that we can't tell if a scheme is affine or not just from it's underlying topological space.
(2) should also be false but I'm unsure about a specific counterexample. I think you can use the example of the above paragraph by putting a funny $\mathcal{O}_X$-structure on the sheaf in question, but I'm having a brain-freeze about it right now.
