I am developing an application using Symfony2. The problem I have is that when creating a folder throe a function in a entity the folder created has no sudo privileges, I would like to know how would it be possible to create the folder directly with sudo permissions. this is my code:
protected function getUploadDirMark()
{
// get rid of the __DIR__ so it doesn't screw when displaying uploaded doc/image in the view.
return 'uploads/documents/'.$this->getIzenburua();
}
The 'uploads/documents/'.$this->getIzenburua();
folder has no sudo permissions, how can I create it with sudo privileges. Thanks.