When using mkdir()
with the recursive flag set to true do all the created directories get the specified chmod or just the last one? For example:
mkdir('/doesnotExist1/doesnotExist2/doesnotExist3/', 0755, true);
Will the newly created directories /doesnotExist1/
and /doesnotExist1/doesnotExist2/
also get the same chmod as /doesnotExist1/doesnotExist2/doesnotExist3/
= 0755?
If not, is there any way to force the above behavior?
I would test this myself, but I don't have access to a *nix box ATM.