MPDF file permission

2

Good afternoon, friends,

I'm dynamically creating folders according to the user's password.

 $dir = "relatorio/".$password;
 if(!file_exists($dir)){
 umask(0);
 mkdir($dir, 0777,true);

 }
 $path = "relatorio/".$password."/".$nomeFormulario.".pdf";
 $mpdf->Output($path, "F");

 //$mpdf->Output();
 header("location: sucesso.php");

 exit();

This code is executed every time the user opens the system, as soon as he opens the system and fills a different questionnaire, it is created inside the report folder, a folder with his password and then inside this folder is generated a PDF using MPDF, but only the first pdf file gets 777 permission, the rest is not.

Any tips?

Thanks:)

    
asked by anonymous 20.07.2015 / 21:35

0 answers