How to fix the «Command line user does not have read and write permissions on var/generation directory» issue?

See also: