How to define the canonical sheaf on singular varieties Let $X$ be a variety which might be singular, how to defined the canonical sheaf $K_X$ on $X$? 
When $X$ is a proper, irreducible variety over $\mathbb{C}$, Ueno defined $K_X$ as the pushforward of the canonical sheaf of its nonsigular model (see Chapter2 in his book " Classification Theory of Algebraic Varieties and Compact Complex Spaces"). However, I was wondering if there is a well-defined canonical sheaf on singular variety which is not proper (over $\mathbb{C}$ is OK for me). I will be very appreciated if someone can point out referenced of this kind.
 A: For $X$ normal, saying that canonical divisor is the pushforward of the canonical divisor of a resolution of singularities is totally fine (it even works in characteristic $p > 0$ if you happen to have a resolution).  In particular, if $\pi : Y \to X$ is a resolution of singularities, then $\pi_* K_Y$ is $K_X$ (here we define $\pi_* K_Y$ by simply throwing away any components of $K_Y$ that get contracted to non-divisorial varieties).  
However:  The pushforward of the canonical sheaf $\omega_Y$ is not the canonical sheaf $\omega_X$ in general.  Indeed, $\pi_* \omega_Y = \omega_X$ is very close to requiring that $X$ has rational singularities.  (Actually one definition of rational singularities, typically attributed to Kempf, is that $X$ is Cohen-Macaulay and $\pi_* \omega_Y = \omega_X$.
A good exercise is to show that if $X = \text{Spec} k[x,y,z]/(x^3+y^3+z^3)$ and $\pi : Y \to X$ is the blowup of the cone point, then $\pi_* \omega_Y = \mathfrak{m} \cdot \omega_X$ where $\mathfrak{m}$ is the maximal ideal of the origin.  (Hint:  use the adjunction formula and the formula for the canonical divisor when blowing up a point on $\mathbb{A}^3$).
The canonical sheaf
Ok, so what is the right definition of the sheaf $\omega_X$ in general?
Well, for a projective variety of dimension $d$, $i : X \hookrightarrow  \mathbb{P}^N$, define
$$i_* \omega_X := \text{Ext}^{N-d}\big(i_* O_X, O_{\mathbb{P}^N}(-N-1)\big).$$  Since $i$ is a closed embedding, this uniquely determines $\omega_X$.
For $X$ quasi-projective, you can define this by localizing.  There are generalizations which apply to other schemes of finite type over $k$ defined using the $f^!$ functor for $f : X \to k$ the structural map, but I won't get into that here.
The canonical sheaf is S2
It turns out that for any variety, $\omega_X$ is an S2 sheaf, this means it satisfies Hartog's phenomena (search math overflow).  In particular, the sheaf is determined by its codimension-1 behavior.  There's an easy way to see this, it turns out that if $h : X \to Z = \mathbb{P^d}$ is a generic projection to a hyperplane of the same dimension, then 
$$h_* \omega_X = \text{Hom}(h_* O_X, O_Z(-d-1)).$$
Now, it easily follows that this sheaf is S2 since it is reflexive on $Z$ and reflexive sheaves on $Z$ are always S2 (see for example Hartshorne's Generalized divisors on Gorenstein schemes).
Why does this matter?  Well it means that if $U$ is the regular locus of $X$, and furthermore $X \setminus U$ has codimension 2 on $X$ (which happens for example if $X$ is normal), then if $j : U \hookrightarrow X$ is the inclusion, then $j_* \omega_U = \omega_X$ since both sheaves are S2 and they agree outside a codimension-2 set.
Back to divisors
This also explains our first statement about divisors.  Indeed, any divisor, like $\pi_* K_Y$ is determined outside a codimension 2 set, it is determined on $U$ in fact.  And so if $X$ is normal, $\pi : Y \to X$ is an isomorphism outside of a codimension-2 set of $X$, and so the canonical divisor on that set works fine as a canonical divisor everywhere.  In particular, it can be computed on $Y$ as claimed.
For non-normal $Y$, something can be done, but the formula isn't quite so simple (you also have to describe by what exactly you mean by a divisor on a non-normal variety).
