I'm working with the KnpSnappyBundle and on trying to create a PDF I get the 500 error Warning: mkdir(): Permission denied
I've looked around and found answers for this questions but they don't seem to specifically relate to the built-in server. I do think that this is a file permissions error but I do not know how to resolve it.
For context, below is the code that is triggering the error:
/**
 * @Route("/", name="home")
 */
function mainOverview() {
    return new Response(
        $this->get('knp_snappy.pdf')
             ->generate(
                'http://www.google.fr',
                '/pdf/test.pdf' // **500 error triggers here**
             ),
        200,
        array(
            'Content-Type'          => 'application/pdf',
            'Content-Disposition'   => 'attachment; filename="file.pdf"'
        )
    );
}
EDIT 1:
Clarified that this is probably a file permissions error, rather than a coding error.
 
    