Your both supposed options are not true. Result permissions will not be neither exact 777
nor "inherited" from parent directory.
To understand what will happen, you need to understand two points:
- What is umask. In *nix systems it's a special mask that is applied to newly created file system elements (directories or files. Well, actually, directory is a file too, but that's out of issue). You can work with it in PHP via
umask()
- For
mkdir()
second parameter is not just "exact permissions". umask will modify it. So end result may (and, best chances are - will be) differ from777
.
Also there's important to realize - that Windows permissions systems is different from *nix - you can not rely on described above when working under Win systems.