When I call mkdir('/tmp/d/e/e/p/p/a/t/h/', 0777, true);
I needed all the subdirectories created so far to have the specified chmod: 0777.
What can be the shortest way for this? I noticed that it did not happen.
root@server [/tmp]# ls -la /tmp/d/e/e/p/p/a/t/h/
total 8
drwxr-xr-x 2 user group 4096 Aug 6 12:59 ./
drwxr-xr-x 3 user group 4096 Aug 6 12:59 ../
Code:
<?php
mkdir('/tmp/d/e/e/p/p/a/t/h', 0777, true);
?>
Please have a look.