I was setting up a site this morning when started seeing this error cannot create temp file for here-document: No space left on device, I couldn’t successfully import a database or even cd into any folder on the machine.
After trying a few things I found this gist: https://gist.github.com/christopher-hopper/9755310 which successfully helped me fix the issue.
In my case I only followed steps 1-9, further steps weren’t necessary.
When dealing with people, let us remember we are not dealing with creatures of logic. We are dealing with creatures of emotion,creatures bristling with prejudices and motivated by pride and vanity.