Thomas Dupont
Thomas Dupont

Reputation: 427

Filesystem mkdir Failed to create "/client/" symfony

Bonjour,

I am using the mkdir function of Filesystem bundle. I need to create a folder for each client I add a 777 permission for all symfony folders

chmod -R 777 /symfony/path/

But I thrown this exception with "/client/" and "/client"

Have I missed something?

My controller is easy

private function addFolder () {
    $fs = new Filesystem();
    $fs->mkdir('/client/');
    return;
}    

It's running on MACOSX

Thanks for support

Upvotes: 0

Views: 2427

Answers (1)

Tomasz Madeyski
Tomasz Madeyski

Reputation: 10900

This is because you are trying to create client directory in root folder - you should not be using / at the beginning of path since this means that your path specification starts at root.

Just replace /client/ with client/ and you should be good

Upvotes: 1

Related Questions