Let $X$ be a scheme of finite type over $\mathrm{Spec}(A)$, where $A$ is a commutative ring. Let $U\subset X$ be any open subset, is $\Gamma(U,\mathscr{O}\_{X})$ a finitely generated $\Gamma(X,\mathscr{O}\_{X})$-algebra?



Is $\Gamma(U,\mathscr{O}_{X})$ a finitely generated $\Gamma(X,\mathscr{O}_{X})$-algebra?
No. The following counterexamples are part of the folklore:


* Even if $X$ is an affine variety over a field $k$ (so $\Gamma(X,\mathscr{O}\_X)$ is certainly of finite type over $k$) and $U\subseteq X$ open, then $\Gamma(U, \mathscr{O}\_X)$ can still fail to be of finite type over $k$ (and in particular, over $\Gamma(X, \mathscr{O}\_X)$): see [Ravi Vakil, “An example of a nice variety whose ring of global sections is not finitely generated”](http://math.stanford.edu/%7Evakil/files/nonfg.pdf).
* Even if $X$ is a connected projective variety over a field $k$ (so $\Gamma(X, \mathscr{O}\_X) = k$ here) and $U\subseteq X$ open, then $\Gamma(U, \mathscr{O}\_X)$ can fail to be noetherian (and in particular, of finite type over $k$): see [Manuel Ojanguren, “Un ouvert bizarre”](https://sma.epfl.ch/%7Eojangure/nichtnoethersch.pdf) [in French, but it's only ½ page long].


(To be clear, here, “variety over $k$” := “reduced scheme of finite type over $k$”.)


[This other question](https://mathoverflow.net/questions/140046/what-are-the-local-properties-of-schemes-preserved-under-global-sections), which also links to the same two counterexamples, is also relevant. See also the context of [Hilbert's 14th problem](https://en.wikipedia.org/wiki/Hilbert%27s_fourteenth_problem).


