PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
umask affects permissions when files and directories are created.
umask is short for "Un-Mask".
So umask is "and"ed with the permissions of mkdir, fopen, etc.
In a sense, the umask setting is "subtracted" from the permissions given to mkdir.
Example:
<PRE>
umask(011);
mkdir('foo', 0777);
</PRE>
will actually make a directory with permissions 0766.
Does this mean your code is not doing anything...??
yes a umask of 000 should mean that what I ask for in mkdir is what I get. If I changed mkdir to asking for 0700 it works properly, if I change the umask to 077 and specify 0777 for mkdir it fails, etc. I managed to find a pair of settings that acheive what I wanted, but it was wierd to have to search through the possible permutations when any of them should have worked