if folder exists php so create folter and give them all persmission in php code code example
Example: php mkdir recursive
<?php
// Create a directory recursively (make sure to sanitize if taken from input as always!)
mkdir("/path/to/my/dir", 0777, true);